JULIA_VERSION=1.11.1 USER=student # array with major, minor and revision number JULIA_VERSION_PARTS=( ${JULIA_VERSION//./ } ) # just major and minor number JULIA_VERSION_SHORT=${JULIA_VERSION_PARTS[0]}.${JULIA_VERSION_PARTS[1]} mkdir -p /opt if ! command -v julia &> /dev/null; then #curl -fsSL https://install.julialang.org > install.sh #sh ./install.sh --yes --add-to-path cd /opt wget https://julialang-s3.julialang.org/bin/linux/x64/$JULIA_VERSION_SHORT/julia-$JULIA_VERSION-linux-x86_64.tar.gz tar -xvf julia-$JULIA_VERSION-linux-x86_64.tar.gz rm julia-$JULIA_VERSION-linux-x86_64.tar.gz mv julia-* julia-$JULIA_VERSION ln -s /opt/julia-$JULIA_VERSION/bin/julia /usr/local/bin fi if command -v check-language-support &> /dev/null; then sudo apt-get -y install $(check-language-support -l fr) sudo apt-get -y install $(check-language-support -l en) fi # DINEOF sudo apt-get update sudo apt-get install -y gfortran make libarpack2-dev libnetcdf-dev libnetcdff-dev netcdf-bin openssh-server sudo apt-get install -y python3-pip python3-setuptools python3-matplotlib libffi-dev curl emacs tmux sudo apt-get install -y perl libopenmpi-dev openmpi-bin desktop-file-utils sudo apt-get install -y subversion git if dpkg --get-selections | grep -q "^ubuntu-mate-welcome[[:space:]]*install$" >/dev/null; then # https://howtoinstall.co/en/ubuntu/xenial/ubuntu-mate-welcome?action=remove sudo apt-get remove ubuntu-mate-welcome fi sudo adduser "$USER" sudo su --login "$USER" <<'EOF' echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc python3 -m pip install --user jupyter python3 -m pip install --user copernicusmarine julia --eval 'using Pkg; pkg"add ZMQ IJulia PyCall PyPlot Interpolations MAT JSON SpecialFunctions Interact Roots JLD2 FileIO Revise"' julia --eval 'using Pkg; pkg"add Glob NCDatasets CSV DataStructures Compat Mustache HTTP PhysOcean DIVAnd Missings DistributedArrays"' julia --eval 'using Pkg; pkg"dev https://github.com/Alexander-Barth/ROMS.jl"' julia --eval 'using IJulia' julia --eval 'using PyPlot' cat >> ~/.emacs <> ~/.julia/config/startup.jl < /tmp/jupyter.desktop <