From fdc1bea3da72d6a10fcdc8e68b56c1d8e3219aaf Mon Sep 17 00:00:00 2001 From: Evening Starlight <55841241+EveningStarlight@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:42:02 -0500 Subject: [PATCH 1/3] Documenting PyTorch support --- docs/en/1-Experiments/Kubeflow.md | 2 +- docs/en/1-Experiments/Selecting-an-Image.md | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/docs/en/1-Experiments/Kubeflow.md b/docs/en/1-Experiments/Kubeflow.md index 384a820c9..29cbabd48 100644 --- a/docs/en/1-Experiments/Kubeflow.md +++ b/docs/en/1-Experiments/Kubeflow.md @@ -54,7 +54,7 @@ You will need to choose an image. There are JupyterLab, RStudio, Ubuntu remote desktop, and SAS images available. The SAS image is only available for StatCan employees (due to license limitations), the others are available for everyone. Select the drop down menu to select additional options within these (for -instance, CPU, PyTorch, and TensorFlow images for JupyterLab). +instance, CPU, and TensorFlow images for JupyterLab). Check the name of the images and choose one that matches what you want to do. Don't know which one to choose? Check out your options [here](./Selecting-an-Image.md). diff --git a/docs/en/1-Experiments/Selecting-an-Image.md b/docs/en/1-Experiments/Selecting-an-Image.md index 71ece9d8c..abf1b212d 100644 --- a/docs/en/1-Experiments/Selecting-an-Image.md +++ b/docs/en/1-Experiments/Selecting-an-Image.md @@ -21,11 +21,20 @@ When selecting an image, you have 3 main options: data transformation, numerical simulation, statistical modelling, machine learning and more. -The jupyter notebooks are great launchpads for analytics including machine learning. The `jupyterlab-cpu` image gives a good core experience for python, including common packages such as `numpy`, `pandas` and `scikit-learn`. If you're interested specifically in using **_TensorFlow_** or **_PyTorch_**, we also have `jupyterlab-tensorflow` and `jupyterlab-pytorch` which come with those tools pre-installed. +The jupyter notebooks are great launchpads for analytics including machine learning. The `jupyterlab-cpu` image gives a good core experience for python, including common packages such as `numpy`, `pandas` and `scikit-learn`. If you're interested specifically in using **_TensorFlow_**, we also have `jupyterlab-tensorflow` which come with those tools pre-installed. -For the `jupyterlab-pytorch` image, the PyTorch packages (torch, torchvision, and torchaudio) are installed in the `torch` conda environment. You must activate this environment to use PyTorch. +For users interested in working with PyTorch, there is support for quickly installing the required packaged. +in the terminal on your created notebook, run the following command: +`mamba clean -a -y && mamba create -n torch && mamba install -n torch -c conda-forge -c pytorch -c nvidia -y --file /usr/bin/requirements.txt` +The PyTorch packages (torch, torchvision, and torchaudio) will be installed in the `torch` conda environment. +You must activate this environment to use PyTorch. +The environment can also be added to the to the JupyterLab Launcher with the following command: -For the `jupyterlab-cpu`, `jupyterlab-tensorflow`, and `jupyterlab-pytorch` images, in the default shell the `conda activate` command may not work. This is due to the environment not being initialized properly. In this case run `bash`, you should see the AAW logo and a few instructions appear. After this `conda activate` should work properly. If you see the AAW logo on startup it means the environment is correctly initialized and `conda activate` should work properly. A fix for this bug is in the works, once this is fixed this paragraph will be removed. +```bash +python -m ipykernel install --user --name "torch" --display-name "PyTorch" +``` + +For the `jupyterlab-cpu`, and `jupyterlab-tensorflow` images, in the default shell the `conda activate` command may not work. This is due to the environment not being initialized properly. In this case run `bash`, you should see the AAW logo and a few instructions appear. After this `conda activate` should work properly. If you see the AAW logo on startup it means the environment is correctly initialized and `conda activate` should work properly. A fix for this bug is in the works, once this is fixed this paragraph will be removed. Each image comes pre-loaded with VS Code in the browser if you prefer a full IDE experience. From e94712a4db9362463d6527b94952f42c051d8103 Mon Sep 17 00:00:00 2001 From: Evening Starlight <55841241+EveningStarlight@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:32:11 -0500 Subject: [PATCH 2/3] fix: path --- docs/en/1-Experiments/Selecting-an-Image.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/en/1-Experiments/Selecting-an-Image.md b/docs/en/1-Experiments/Selecting-an-Image.md index abf1b212d..0b916562a 100644 --- a/docs/en/1-Experiments/Selecting-an-Image.md +++ b/docs/en/1-Experiments/Selecting-an-Image.md @@ -25,7 +25,7 @@ The jupyter notebooks are great launchpads for analytics including machine learn For users interested in working with PyTorch, there is support for quickly installing the required packaged. in the terminal on your created notebook, run the following command: -`mamba clean -a -y && mamba create -n torch && mamba install -n torch -c conda-forge -c pytorch -c nvidia -y --file /usr/bin/requirements.txt` +`mamba clean -a -y && mamba create -n torch && mamba install -n torch -c conda-forge -c pytorch -c nvidia -y --file /usr/local/bin/requirements.txt` The PyTorch packages (torch, torchvision, and torchaudio) will be installed in the `torch` conda environment. You must activate this environment to use PyTorch. The environment can also be added to the to the JupyterLab Launcher with the following command: From 4a90e80e5373cafefd248692c3f41232d1490325 Mon Sep 17 00:00:00 2001 From: Evening Starlight <55841241+EveningStarlight@users.noreply.github.com> Date: Fri, 24 Jan 2025 13:03:28 -0500 Subject: [PATCH 3/3] fix: requested changes --- docs/en/1-Experiments/Selecting-an-Image.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/1-Experiments/Selecting-an-Image.md b/docs/en/1-Experiments/Selecting-an-Image.md index 0b916562a..54661718f 100644 --- a/docs/en/1-Experiments/Selecting-an-Image.md +++ b/docs/en/1-Experiments/Selecting-an-Image.md @@ -24,10 +24,10 @@ When selecting an image, you have 3 main options: The jupyter notebooks are great launchpads for analytics including machine learning. The `jupyterlab-cpu` image gives a good core experience for python, including common packages such as `numpy`, `pandas` and `scikit-learn`. If you're interested specifically in using **_TensorFlow_**, we also have `jupyterlab-tensorflow` which come with those tools pre-installed. For users interested in working with PyTorch, there is support for quickly installing the required packaged. -in the terminal on your created notebook, run the following command: +In the terminal on your created notebook, run the following command: `mamba clean -a -y && mamba create -n torch && mamba install -n torch -c conda-forge -c pytorch -c nvidia -y --file /usr/local/bin/requirements.txt` The PyTorch packages (torch, torchvision, and torchaudio) will be installed in the `torch` conda environment. -You must activate this environment to use PyTorch. +You must activate this environment using `mamba activate torch` to use PyTorch. The environment can also be added to the to the JupyterLab Launcher with the following command: ```bash