GPU Servers in the Cloud for Classes

Research Computing can support classes that need GPUs by bursting to the cloud from the MyAdroit web portal. Students connect to the MyAdroit web portal using a web browser, choose their class, and can then work interactively in a Jupyter notebook with a GPU. The current configuration per student is 16 CPU-cores, 60 GB of CPU memory and an NVIDIA A10G GPU with 24 GB of GPU memory.

The following steps will only work if the student has an account on Adroit and they are approved to use Jupyter for Classes for a specific class. Enrollment in certain classes is sufficient to satisfy these two requirements. To use Jupyter without being in a class see our Jupyter page.

Step 1: Point Your Web Browser at MyAdroit

Point your web browser (Chrome or FireFox preferred) to https://myadroit.princeton.edu.  Use a VPN if you are working remotely or if it is needed to connect to the secure segment of the eduroam network.

Troubleshooting: Make sure that you are connected to the eduroam network. Try using a VPN even if you are on campus and using the eduroam network. Browse to https://myip.rc.princeton.edu to learn more about your network connection. Lastly, submit a support ticket.

Step 2: Choose "Interactive Apps" then "Jupyter for Classes"

Jupyter for Classes

Step 3: Enter the Session Information then Click on "Launch"

Choose the "Class" and "Number of Hours". Accept the default values for the "Number of cores" and "Memory allocated for the job". The partition should be set to "cloud". Click on the "Lauch" button at the bottom of the page.

Complete Form

Step 4: Wait 1 or 2 Minutes for the Session to Start

The session should be available in 1-2 minutes. If it takes longer than 5 minutes then something is wrong. In that case, click on the "Submit support ticket" link to report the problem.

Waiting on the Session

Step 5: Click on "Connect to Jupyter"

When the session becomes available, click on the "Connect to Jupyter" button.

Launch Session

Step 6a: Start a New Jupypter Notebook

To create a new notebook, click on "New" in the upper right then choose "Python 3 (ipykernel)". You can then begin working in the new notebook.

New Notebook

Step 6b: Open a Jupypter Notebook

To open a notebook stored on the /home or /scratch/network filesystems, choose "File" from the menu at the very top then "Open from Path ...". Enter a path such as /scratch/network/aturing/mynotebook.ipynb, where "aturing" should be replaced with your NetID.

Open An Existing Notebook

Step 7: Ending a Session

The university pays a cloud provider for every hour that you use. When you are done working, please terminate the session. This is done by closing your Jupyter notebook tab (be sure to save the notebook file), and then clicking on the red "Delete" button as shown below:

Ending a Session

No Internet on the GPU Servers

You cannot access the internet from your Jupyter session. If you need data or models then you will need to store those in your account from the Adroit login node. You can use the OnDemand interface to transfer files from your local computer (e.g., laptop) to Adroit. You can also use commands like scp. Lastly, as explained next, you can make downloads directly on the Adroit login node using the software for the course.

Downloading Models and Datasets on the Command Line

One can download models and datasets on the Adroit login node by activating the software environment and then running the appropriate commands. From the OnDemand main menu (orange bar), choose "Clusters" and then "Adroit Cluster Shell Access". This will open a Linux terminal. You can then use the software to download models or datasets which will then be available in your  Jupyter session. Here is an example:

aturing@adroit5:~$ module load anaconda3/2024.2
(base) aturing@adroit5:~$ conda activate /opt/export/course/cos435/anaconda3
(/opt/export/course/cos435/anaconda3) aturing@adroit5:~$ python
>>> import torch
>>> torchvision.datasets.MNIST('data', train=True, download=True)

For the other courses use the substitution:

$ conda activate /opt/export/course/phi543_gpu/anaconda3/  # PHI543/SML543/PHI354/SML354
$ conda activate /opt/export/course/sml301/anaconda3/  # SML301

Custom Conda Environments

Each class comes with a pre-made software environment that is availabe in Jupyter. If you need more than what is provided in that software environment then continue reading.

You can install a custom Conda environment on the Adroit login node (or adroit-vis) and then use it on the GPU cloud server. See the directions for installing custom Conda environments. After the installation, when making the session, in Step 3, for the field "How to handle conda environmnets in your home directory", choose "Only use those conda envs that already have ipykernel installed". Make sure that you have installed the "ipykernel" package in your Conda environment. When the Jupyter interface loads, choose "New" and then the name of your Conda environment (instead of "Python 3 (ipykernel)").

Filesystems

The /home and /scratch/network filesystems on Adroit are available to you in the cloud environment. Keep an eye on your available space by using the checkquota command.

Reconnecting to a Running Session

If your connection is disrupted, you can reconnect to a running session by clicking on "My Interactive Sessions" in the main menu (orange bar). This is not true if the run time limit has been reached.

How to Get Help

Send an email to [email protected] or attend an in-person help session.