Skip to content

Instantly share code, notes, and snippets.

@christophernhill
Last active July 7, 2021 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christophernhill/db3a701452769ab32940078f8f20753e to your computer and use it in GitHub Desktop.
Save christophernhill/db3a701452769ab32940078f8f20753e to your computer and use it in GitHub Desktop.
Provision directory on Mac for current oceananigans validation/ examples
alias julia=~/projects/julia-1.6.1/bin/julia
plat="Linux"
alias julia=/Applications/Julia-1.6.app/Contents/Resources/julia/bin/julia
plat="MacOSX"
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-${plat}-x86_64.sh
# To set up MPI may need
# /home/ubuntu/projects/julia-1.6.1/bin/julia -e 'using Libdl; p=dlopen("libmpi", RTLD_LAZY; throw_error=false); p=dlopen("libmpi", RTLD_LAZY; throw_error=false); using Pkg; Pkg.build("MPI"; verbose=true)'
chmod +x Miniconda3-latest-${plat}-x86_64.sh
./Miniconda3-latest-${plat}-x86_64.sh -b -p miniconda3
. miniconda3/bin/activate && conda create -y --name=py39 python=3.9
conda activate py39
conda install -y matplotlib
conda install -y numpy
conda install -y cartopy
conda install -y scipy
conda install -y --channel=conda-forge cmocean
export JULIA_DEPOT_PATH=`pwd`/.julia
julia --project=. -e "using Pkg; Pkg.instantiate();"
julia --project=. -e "using Oceananigans"
julia --project=. -e 'using Pkg; Pkg.add("DataDeps")'
julia --project=. -e 'using Pkg; Pkg.add("PyCall")'
julia --project=. -e 'using PyCall; pyimport_conda("matplotlib.pyplot", "matplotlib")'
julia --project=. -e 'using PyCall; pyimport_conda("numpy.ma", "numpy")'
julia --project=. -e 'using PyCall; pyimport_conda("cartopy.crs", "cartopy")'
julia --project=. -e 'using PyCall; pyimport_conda("cmocean", "cmocean","conda-forge")'
julia --project=. -e 'using Pkg;Pkg.add("Plots");Pkg.add("TimesDates");Pkg.add("SpecialFunctions");Pkg.add("BenchmarkTools")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment