File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525echo -e " ${red_start} Starting Miniforge3 installation${nocolor_start} "
2626
2727# download Miniforge
28- if [ -f ~ /Miniforge3.sh ]; then
28+ if [ ! -f ~ /Miniforge3.sh ]; then
2929 wget " https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh" -O ~ /Miniforge3.sh
3030else
3131 echo " Miniforge already downloaded!"
3434# install Miniforge
3535# default directory is ~/miniforge3
3636
37+ if [ -d ~ /miniforge3 ]; then
38+ echo " ~/miniforge3 directory already exists"
39+ echo " deleting and re-installing Miniforge"
40+ rm -r ~ /miniforge3
41+ fi
3742sh ~ /Miniforge3.sh -b
3843
3944# add conda and mamba to .bashrc or equivalent
4045~ /miniforge3/bin/conda init
4146~ /miniforge3/bin/mamba init
47+ source ~ /.bashrc
4248
4349echo -e " ${red_start} Completed Miniforge3 installation${nocolor_start} "
44- echo -e " ${red_start} Restart your shell${nocolor_start} "
50+ # echo -e "${red_start}Restart your shell${nocolor_start}"
4551
46- mamba update -n base -c conda-forge conda
52+ mamba update -n base -c conda-forge conda -y
4753
4854# this one is a bit of a mystery, but required
4955echo " export LD_LIBRARY_PATH=$LD_LIBRARY_PATH :~/miniforge3/lib" >> ~ /.bashrc
56+ source ~ /.bashrc
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ red_start='\033[0;31m'
2121blue_start=' \033[0;34m'
2222nocolor_start=' \033[0m'
2323
24- # # set paths to environment and package directories
24+ mamba init
2525
2626# create jupyter environment
2727mamba create --name jupyter python=3.11 -y
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ red_start='\033[0;31m'
1414blue_start=' \033[0;34m'
1515nocolor_start=' \033[0m'
1616
17- # # set paths to environment and package directories
17+
18+ conda init
19+
1820# create conda environment called 'jupyter'
1921env_name=' jupyter'
2022
@@ -47,7 +49,6 @@ mamba install -n ${env_name} xarray[complete] jupyterlab dask_labextension s3fs
4749mamba install -n ${env_name} pyresample -y
4850
4951# install remaining packages using pip
50- # (mamba installs tend to get killed on t2.micro)
5152pip install ecco_v4_py --no-cache-dir
5253
5354echo -e " ${red_start} Completed Python package installations${nocolor_start} "
Original file line number Diff line number Diff line change @@ -7,10 +7,12 @@ red_start='\033[0;31m'
77blue_start=' \033[0;34m'
88nocolor_start=' \033[0m'
99
10- source ~ /conda/bin/activate
10+
11+ conda init
12+ source ~ /miniforge3/bin/activate
1113conda activate jupyter
1214
13- echo " Staring Jupyter lab session!"
15+ echo " Starting Jupyter lab session!"
1416echo " "
1517
1618read -p ' Which port do you want to use [default 9889]: ' user_port
You can’t perform that action at this time.
0 commit comments