technical:recipes:jupyter-notebook

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
technical:recipes:jupyter-notebook [2024-10-11 10:58] – [Requesting an interactive job] anitatechnical:recipes:jupyter-notebook [2025-02-04 09:48] (current) – [VALET Package Definition] anita
Line 24: Line 24:
 </code> </code>
  
-After loading the Anaconda software, we will want create the Jupyter Notebook virtual environment. In this example we will call it ''jupyter-notebook'', but you are welcome to call it anything you would like. Before creating it, we will want to see what "default" version of Python 3 is available on as part of Anaconda.+After loading the Anaconda software, we will want create the Jupyter Notebook virtual environment. In this example we will call it ''jupyter-notebook'', but you are welcome to call it anything you would like. We will specify a version directory by date ''20240801'' for the installation of the August 2024 Jupyter Notebook virtual environment. This is needed for setting up a VALET package definition, and allows for multiple versions to be installed based on need. You will be asked to ''Proceed ([y]/n)?'' and you will want to choose ''y'' as this is advising you that prerequisite software is also going to be installed
  
 <code bash> <code bash>
-[(it_css:traine)@login00 ~]$ which python3 +[(it_css:traine)@login00 ~]$ conda create --prefix $WORKDIR/sw/anaconda-envs/jupyter-notebook/20240801 -c jupyter python=3 jupyter
-/opt/shared/anaconda/2024.02/bin/python3 +
-[(it_css:traine)@login00 ~]$ python3 --version +
-Python 3.11.7 +
-</code> +
- +
-Now that we know the version of python3 loaded into our environment is ''3.11.7'', we can run the commands to create a virtual environment. We will also specify a version directory by date ''20240801'' for the installation of the August 2024 Jupyter Notebook virtual environment. This is needed for setting up a VALET package definition, and allows for multiple versions to be installed based on need. You will be asked to ''Proceed ([y]/n)?'' and you will want to choose ''y'' as this is advising you that prerequisite software is also going to be installed.  +
- +
-<code bash> +
-[(it_css:traine)@login00 ~]$ conda create --prefix $WORKDIR/sw/anaconda-envs/jupyter-notebook/20240801 -c jupyter python=3.11.7+
 Channels: Channels:
  - jupyter  - jupyter
- defaults+ conda-forge 
 + - nodefaults
 Platform: linux-64 Platform: linux-64
 Collecting package metadata (repodata.json): done Collecting package metadata (repodata.json): done
Line 49: Line 41:
  
   added / updated specs:   added / updated specs:
-    - python=3.11.7+    - jupyter 
 +    - python=3
  
  
Line 56: Line 49:
     package                    |            build     package                    |            build
     ---------------------------|-----------------     ---------------------------|-----------------
-    ca-certificates-2024.7.2   |       h06a4308_0         127 KB +      : 
-    pip-24.0                   |  py311h06a4308_0         3.3 MB +    jupyter-1.1.1              |     pyhd8ed1ab_1           9 KB  conda-forge 
-    python-3.11.7                    h955ad1f_0        32.MB +    jupyter-lsp-2.2.5              pyhd8ed1ab_1          54 KB  conda-forge 
-    setuptools-69.5.         |  py311h06a4308_0         1.3 MB +    jupyter_client-8.6.3       |     pyhd8ed1ab_1         104 KB  conda-forge 
-    wheel-0.43.0               |  py311h06a4308_0         146 KB+    jupyter_console-6.6.3      |     pyhd8ed1ab_1          26 KB  conda-forge 
 +    jupyter_core-5.7.2             pyh31011fe_1          56 KB  conda-forge 
 +    jupyter_events-0.11.0          pyhd8ed1ab_0          22 KB  conda-forge 
 +    jupyter_server-2.15.0      |     pyhd8ed1ab_0         320 KB  conda-forge 
 +    jupyter_server_terminals-0.5.3|     pyhd8ed1ab_1          19 KB  conda-forge 
 +    jupyterlab-4.3.5               pyhd8ed1ab_0         7.MB  conda-forge 
 +    jupyterlab_pygments-0.3.0  |     pyhd8ed1ab_2          18 KB  conda-forge 
 +    jupyterlab_server-2.27.3       pyhd8ed1ab_1          48 KB  conda-forge 
 +    jupyterlab_widgets-3.0.13  |     pyhd8ed1ab_1         182 KB  conda-forge 
 +      : 
 +    yaml-0.2.5                       h7f98852_2          87 KB  conda-forge 
 +    zeromq-4.3.5                     h3b0a872_7         328 KB  conda-forge 
 +    zipp-3.21.0                |     pyhd8ed1ab_1          21 KB  conda-forge 
 +    zstandard-0.23.0           |  py313h80202fe_1         414 KB  conda-forge 
 +    zstd-1.5.6                       ha6fb4c9_0         542 KB  conda-forge
     ------------------------------------------------------------     ------------------------------------------------------------
-                                           Total:        37.MB+                                           Total:        87.MB
  
 The following NEW packages will be INSTALLED: The following NEW packages will be INSTALLED:
  
-  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main +    
-  _openmp_mutex      pkgs/main/linux-64::_openmp_mutex-5.1-1_gnu +  jupyter            conda-forge/noarch::jupyter-1.1.1-pyhd8ed1ab_1  
-  bzip2              pkgs/main/linux-64::bzip2-1.0.8-h5eee18b_6 +  jupyter-lsp        conda-forge/noarch::jupyter-lsp-2.2.5-pyhd8ed1ab_1  
-  ca-certificates    pkgs/main/linux-64::ca-certificates-2024.7.2-h06a4308_0 +  jupyter_client     conda-forge/noarch::jupyter_client-8.6.3-pyhd8ed1ab_1  
-  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1 +  jupyter_console    conda-forge/noarch::jupyter_console-6.6.3-pyhd8ed1ab_1  
-  libffi             pkgs/main/linux-64::libffi-3.4.4-h6a678d5_1 +  jupyter_core       conda-forge/noarch::jupyter_core-5.7.2-pyh31011fe_1  
-  libgcc-ng          pkgs/main/linux-64::libgcc-ng-11.2.0-h1234567_1 +  jupyter_events     conda-forge/noarch::jupyter_events-0.11.0-pyhd8ed1ab_0  
-  libgomp            pkgs/main/linux-64::libgomp-11.2.0-h1234567_1 +  jupyter_server     conda-forge/noarch::jupyter_server-2.15.0-pyhd8ed1ab_0  
-  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-11.2.0-h1234567_1 +  jupyter_server_te~ conda-forge/noarch::jupyter_server_terminals-0.5.3-pyhd8ed1ab_1  
-  libuuid            pkgs/main/linux-64::libuuid-1.41.5-h5eee18b_0 +  jupyterlab         conda-forge/noarch::jupyterlab-4.3.5-pyhd8ed1ab_0  
-  ncurses            pkgs/main/linux-64::ncurses-6.4-h6a678d5_0 +  jupyterlab_pygmen~ conda-forge/noarch::jupyterlab_pygments-0.3.0-pyhd8ed1ab_2  
-  openssl            pkgs/main/linux-64::openssl-3.0.14-h5eee18b_0 +  jupyterlab_server  conda-forge/noarch::jupyterlab_server-2.27.3-pyhd8ed1ab_1  
-  pip                pkgs/main/linux-64::pip-24.0-py311h06a4308_0 +  jupyterlab_widgets conda-forge/noarch::jupyterlab_widgets-3.0.13-pyhd8ed1ab_1  
-  python             pkgs/main/linux-64::python-3.11.7-h955ad1f_0 +   
-  readline           pkgs/main/linux-64::readline-8.2-h5eee18b_0 +  yaml               conda-forge/linux-64::yaml-0.2.5-h7f98852_2  
-  setuptools         pkgs/main/linux-64::setuptools-69.5.1-py311h06a4308_0 +  zeromq             conda-forge/linux-64::zeromq-4.3.5-h3b0a872_7  
-  sqlite             pkgs/main/linux-64::sqlite-3.45.3-h5eee18b_0 +  zipp               conda-forge/noarch::zipp-3.21.0-pyhd8ed1ab_1  
-  tk                 pkgs/main/linux-64::tk-8.6.14-h39e8969_0 +  zstandard          conda-forge/linux-64::zstandard-0.23.0-py313h80202fe_1  
-  tzdata             pkgs/main/noarch::tzdata-2024a-h04d1e81_0 +  zstd               conda-forge/linux-64::zstd-1.5.6-ha6fb4c9_0  
-  wheel              pkgs/main/linux-64::wheel-0.43.0-py311h06a4308_0 +   
-  xz                 pkgs/main/linux-64::xz-5.4.6-h5eee18b_1 +  
-  zlib               pkgs/main/linux-64::zlib-1.2.13-h5eee18b_1+
 Proceed ([y]/n)? y Proceed ([y]/n)? y
  
Line 128: Line 134:
         - action: source         - action: source
           script:           script:
-              sh: anaconda-activate.sh+              sh: anaconda-activate-2024.sh
           order: failure-first           order: failure-first
           success: 0           success: 0
Line 138: Line 144:
 </code> </code>
  
-<note>The ''prefix'' show here ''/work/it_css/sw/anaconda-envs/jupyter-notebook'' will need to be changed based on your workgroup and directory names.</note>+<note>The ''prefix'' shown here ''/work/it_css/sw/anaconda-envs/jupyter-notebook'' will need to be changed based on your workgroup and directory names.</note>
  
 ===== Using Jupyter Notebook Virtual Environment ===== ===== Using Jupyter Notebook Virtual Environment =====
Line 176: Line 182:
  
 ==== Loading the Jupyter Notebook virtual environment ==== ==== Loading the Jupyter Notebook virtual environment ====
-After the interactive session has been established, it is time to load the Jupyter Notebook virtual environment with ''VALET''. Even though we did this earlier, it needs to be done again since we are now on a compute node. +After the interactive job has been established, it is time to load the Jupyter Notebook virtual environment with ''VALET''. Even though we did this earlier, it needs to be done again since we are now on a compute node. 
 <code bash> <code bash>
 [[traine@r00n50 1201]$ vpkg_require jupyter-notebook/20240801 [[traine@r00n50 1201]$ vpkg_require jupyter-notebook/20240801
  • technical/recipes/jupyter-notebook.1728658705.txt.gz
  • Last modified: 2024-10-11 10:58
  • by anita