This is an old revision of the document!


This app will launch a Jupyter notebook on a compute node and will allow you to connect to it and run notebooks. It currently only supports Python 3.10.4.

You can now also choose which filesystem Jupyter starts in, through a dropdown box. Currently the only options are /scratch/$USER and any other group directory you have in /scratch.

Python

Before launching the Jupyter notebook, this interactive app loads the module: IPython (versions vary). Since this is just a basic Python, you might want to build you own virtual environments and have them available in the Jupyter notebook.

Building the Python virtual environment

We suggest you put your Python virtual environment in your home directory, rather than /scratch, since the number of files can be quite high, particularly if you have several virtual environments. Before building the virtual environment, you need to load the appropriate module:

module load <ipython_version>

where <ipython_version> should be replaced by the appropriate IPython version. We support the following versions:

  • <ipython_version> = IPython/8.5.0-GCCcore-11.3.0 for Python 3.10.4

Now build a virtual environment in $HOME/venvs:

python3 -m venv $HOME/venvs/my_env

Activate the virtual environment you just built:

source $HOME/venvs/my_env/bin/activate

It is advisable to upgrade the version of pip for you new virtual environment, to suppress the warning that you will get anytime you install a new package. Also installing or updating the wheels and setuptools modules is required.

pip install --upgrade pip wheel setuptools

Before you are able to build a Jupyter Notebook kernel for your new virtual environment, there are a few additional packages that you need to install:

pip install pip install tomlkit jupyter-contrib-core

Finally, you can generate a Jupyter Notebook kernel from this virtual environment:

python -m ipykernel install --user --name=my_env

You can check that the kernel has been properly generated by having a look at its file, which is usually in $HOME/.local/share/jupyter/kernels/my_env/kernel.json. If you see a reference to your virtual environment in this file, something like $HOME/venvs/my_env/bin/python, this means that everything is properly set up.

That's it! You now have access to the virtual environment you've just built from the Jupyter Notebook (note that you may need to reload the Jupyter web page), through a kernel named my_env (You can, of course, use any name you please).

Any packages you install in this virtual environment will be available from the Jupyter Notebook immediately. We suggest you use a requirements.txt file to keep track of the packages you've installed.

The Remote Desktop app will launch a graphical desktop environment (based on (MATE) on a compute node, allowing you to interactively run tools with a graphical user interface with some more resources than what's available on the login/interactive nodes. By submitting to the gpu partition, you can even make use of a GPU and do OpenGL hardware rendering. The desktop environment itself has some tools like a web browser, text editors, and terminal available, but in a terminal you can also make use of all the modules. This would allow you to run tools like MATLAB, Mathematica, ParaView, or VMD.