Skip to content

Commit

Permalink
[src][jupyterlabs-conda] pin some deps version and comments
Browse files Browse the repository at this point in the history
This allows GPU_Workshop.ipynb to run and we fix Python to 3.11.
Else the now default 3.13 breaks things such as cupy and others.
Make sure we get all of the workshop content in.
  • Loading branch information
smokhov committed Jan 23, 2025
1 parent 7bf7a6b commit ff53158
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions src/jupyter/jupyterlabs-conda/run_jupyterlab.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ if (! $?CONDA_PREFIX) then
module load anaconda3/2023.03/default
endif

module load python/3.11.6/default
module load cuda/11.8/default

# Set temporary directories
# (For faster I/O to use /nobackup local disk space comment these out)
setenv TMPDIR /speed-scratch/$USER/tmp
Expand Down
18 changes: 14 additions & 4 deletions src/jupyter/jupyterlabs-conda/setup_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,35 @@ echo "Setting conda env..."
date

module load anaconda3/2023.03/default
module load python/3.11.6/default
module load cuda/11.8/default

conda create -p $JUPYTER_DATA_DIR/jupyter-env -y
conda activate $JUPYTER_DATA_DIR/jupyter-env

conda install -c conda-forge jupyterlab -y
#conda install -c conda-forge jupyterlab -y
conda install -c conda-forge python=3.11 jupyterlab -y
#conda install -c conda-forge python=3.11 cupy jupyterlab -y

echo "Installing initial Python packages..."
date

# pip3 install --quiet torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
# pip3 install --quiet torch torchvision --index-url https://download.pytorch.org/whl/cu118
pip3 install --quiet torch --index-url https://download.pytorch.org/whl/cu118

echo "Peparin some notebooks..."
date

# Get some initial notebooks up
cp ../*.ipynb $JUPYTER_DATA_DIR
wget --directory-prefix=$JUPYTER_DATA_DIR \
https://raw.githubusercontent.com/NAG-DevOps/formation_cpu-gpu/refs/heads/master/GPU_Workshop.ipynb
cp -f ../*.ipynb $JUPYTER_DATA_DIR
#wget --directory-prefix=$JUPYTER_DATA_DIR \
# https://raw.githubusercontent.com/NAG-DevOps/formation_cpu-gpu/refs/heads/master/GPU_Workshop.ipynb
git clone --depth=1 https://github.com/NAG-DevOps/formation_cpu-gpu
cd formation_cpu-gpu
mv -f GPU_Workshop.ipynb images get_cifar10.sh "$JUPYTER_DATA_DIR/"
cd ..
rm -rf formation_cpu-gpu

echo "Done."
date
Expand Down

0 comments on commit ff53158

Please sign in to comment.