...
First, create your virtual environment. We use version 3.79.4 14 to demonstrate in this example. Additionally, we install the virtual environment to our hypothetical home directory in this example, but you may create and use virtual environments wherever is convenient.
Code Block |
---|
HMSID@login01:~$ module load gcc/69.2.0 python/3.79.414 HMSID@login01:~$ virtualenv jupytervenv |
Recall from Using Applications on O2 and exploration via module avail
that the python/3.79.414 module will not be visible nor loadable until gcc/69.2.0
is loaded.
Now, source the environment, and install jupyter:
...
Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
Open a new LOCAL terminal. The following instructions assume you will be connecting from OS X or some other native *nix terminal (e.g. via Debian/CentOS, etc.). If on Windows, use some sort of terminal emulator such as Cygwin or MobaXterm (further configuration may be required, e.g. for X11 forwarding). Make sure you have X11 forwarding active (e.g. XQuartz is running if on a Mac). You can find additional informations about X11 forwarding at Using X11 Applications Remotely Pick a port on your local machine that is empty using whatever methods you like (e.g.
Now, request an interactive session (for illustrative purposes, we've landed at login01 as our login node):
If you might require multiple cores and more than 1GB of memory for your notebook, also specify that here, via Let's pretend we landed on compute-a-16-20. Start the virtual environment and notebook (Jupyter and your virtual environment will require compiler libraries, so you'll need to load GCC as well):
Alternately, to open an existing notebook:
On newer versions of Jupyter (notebook >= 4.1), the developers implemented token authentication, which is on by default. If you have a freshly installed version of Jupyter, your notebook will have a token associated with it. When you run the above command, you should see a URL show up in the terminal that contains your session token. Click it, then it should open in your local machine's browser. You're all done! |
...
Code Block |
---|
HMSID@compute-a-16-68:~$ module load gcc/69.2.0 python/3.79.414 R/3.4.1 HMSID@compute-a-16-68:~$ source jupytervenv/bin/activate (jupytervenv) HMSID@compute-a-16-68:~$ R > install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest')) # select mirror > devtools::install_github('IRkernel/IRkernel') > IRkernel::installspec() |
...