Follow these instructions to test your Jupyter notebooks on the RHEL 9 minicluster during the transition to the new cluster. After maintenance, these instructions will be obsolete and you will be able to use the OOD apps.
- Start a desktop session on Open OnDemand. For a refresher, follow the instructions here.
- Open a terminal. This terminal is running on the old RHEL 7. Run this command to start firefox
module load firefox/87.0 && firefox &
Perform the next step in a different terminal. We will return to this desktop session in Step 3.
- Follow the instructions here to connect to login009 on a terminal.
- Start an interactive job with the appropriate amount of resources. For example, to request 4 cores and 16GB of memory for 2 hours, run:
interact -n 1 -m 16g -t 2:00:00
- On the compute node, run these commands:
unset XDG_RUNTIME_DIR
module load anaconda
ipnport=$(shuf -i8000-9999 -n1)
echo $ipnport
ipnip=$(hostname -i)
echo $ipnip
jupyter-notebook --no-browser --port=$ipnport --ip=$ipnip
{% hint style="info" %} Replace jupyter-notebook with jupyter-lab in the last line to use JupyterLab interface {% endhint %}
- You will see a lot of text output in the terminal screen. Find the line that looks like
file:///oscar/home/...........-open.html
- Copy that line.
Go back to your Open OnDemand Desktop session from Step 1. Paste the line from the previous step in the address bar on Firefox.
You should see Jupyter notebook displayed inside the browser. While the computations happen on the compute node running RHEL 9, you will see the Jupyter interface on the older OS.
There are two ways to test any conda or python virtual environments that you may have installed in your personal directories on Oscar.
If your Python or Conda environment has been configured with ipykernel correctly, you will see your environment in the selection list when you try to switch the kernel.
For more information on configuring your environments, follow the instructions here.
Activate your Python virtual environment or Conda environment before running the jupyter-notebook
command. If you are using a Python virtual environment, you may not need to run the line module load anaconda