Skip to content

Commit a33d933

Browse files
author
Andrew Delman
committed
some fixes to jupyter_env_setup.sh
1 parent 150fa6d commit a33d933

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ECCO-ACCESS/Cloud_access_to_ECCO_datasets/jupyter_env_setup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ mamba init
4444

4545
# set paths to environment and package directories
4646
printf '\n# set conda environment and package directories' >> ~/.bashrc
47-
printf '\nexport CONDA_ENVS_PATH=/opt/conda/envs' >> ~/.bashrc
48-
printf '\nexport CONDA_PKGS_DIRS=/opt/conda/pkgs' >> ~/.bashrc
47+
printf '\nexport CONDA_ENVS_PATH=/tmp/conda/envs' >> ~/.bashrc
48+
printf '\nexport CONDA_PKGS_DIRS=/tmp/conda/pkgs' >> ~/.bashrc
4949
source ~/.bashrc
5050

51-
# create jupyter environment under /opt/conda/envs/
51+
# create jupyter environment under /tmp/conda/envs/
5252
# (in EBS storage to save space in home directory)
5353
mamba create --name jupyter python=3.8 -y
5454
echo -e "${red_start}Created jupyter environment${nocolor_start}"
@@ -121,14 +121,14 @@ fi
121121
sudo chmod 400 ~/.netrc
122122

123123
# set up Jupyter lab, to be opened in a tmux session using password
124-
PW="$(python3 -c 'from notebook.auth import passwd; import getpass; print(passwd(getpass.getpass(), algorithm="sha256"))')"
124+
PW="$(python3 -c 'from jupyter_server.auth import passwd; import getpass; print(passwd(getpass.getpass(), algorithm="sha256"))')"
125125
jlab_start="\'mamba activate jupyter && jupyter lab --no-browser --autoreload --port=9889 --ip=\'127.0.0.1\' --NotebookApp.token=\'\' --NotebookApp.password=\"$PW\" --notebook-dir=\"~/ECCO-v4-Python-Tutorial/Tutorials_as_Jupyter_Notebooks\" \'"
126-
tmux new-session -d -s jupyterlab ${jlab_start}
126+
tmux new -d -s jupyterlab ${jlab_start}
127127

128128
echo -e "${red_start}Started Jupyter lab in tmux session jupyterlab"
129129
echo -e "${red_start}Access from your local machine in a browser window at"
130130
echo -e "${blue_start}http://127.0.0.1:9889/"
131131
echo -e "${red_start}tmux session can be accessed with"
132132
echo -e "${blue_start}tmux -a -t jupyterlab"
133133
echo -e "${red_start}and terminated with"
134-
echo -e "${blue_start}tmux kill-ses -t jupyterlab${nocolor_start}"
134+
echo -e "${blue_start}tmux kill-ses -t jupyterlab${nocolor_start}"

0 commit comments

Comments
 (0)