Overview
- Agate cluster
- A40 GPU
- Interactive GPU partition
- JupyterLab Interface
- Open OnDemand
- Singularity (Apptainer)
- Build or Locate a Singularity Image
- Make the Custom Kernel Selectable by Assigning a Display Name
- Edit the Kernel Description File
- Launch a Notebook on an A40 Node
- Select kernel
1. Build or Locate a Singularity Image
For the example below, you can use a public singularity image provided. The definition file for this example image is also provided, so you can build the image yourself. If you have never used Singularity before, please start here.
To build the image yourself, you can start with a Singularity Definition File like this one. The Definition File contains all the software packages (including JupyterLab) that are needed. If you are running singularity on your laptop, you can build a new image with the command:
singularity build my-new-image.sif my-definition-file.def
2. Make the Custom Kernel Selectable by Assigning a Display Name
Create a skeleton .json file for the python kernel that you want to run from a Singularity container.
python3 -m ipykernel install --user --name singularity-qiskit --display-name "Python 3.8 Singularity QISKIT"
3. Edit the Kernel Description File
In a shell (through OnDemand or ssh) open the file
~/.local/share/jupyter/kernels/singularity-qiskit/kernel.json { "argv": [ "/usr/bin/singularity", "exec", "--nv", "-B", "/home/mygroup/myuname:/home/mygroup/myuname", "-B", "/panfs/roc:/panfs/roc", "-B", "/panfs/jay:/panfs/jay", "https://public.s3.msi.umn.edu/singularity-images/quantum-oct-2022.sif", "/usr/bin/python3", "-m", "ipykernel", "-f", "{connection_file}" ], "interrupt_mode": "message", "display_name": "Python 3.8 Singularity QISKIT", "language": "python" }
In the example above, replace /home/mygroup/myuname with your home directory.
After you have a singularity image, note the location. It can be placed somewhere on Primary storage (home directory or group project space) or it can be placed as a publically accessible object on an S3 bucket. For example, https://public.s3.msi.umn.edu/singularity-images/quantum-oct-2022.sif
4. Launch a Notebook on an A40 Node
From OnDemand,
5. Connect to Jupyter Notebook
Connect to the Notebook
6. Select kernel
After you connect to the notebook, you should be able to see the Display Name you set for your kernel in step 2. Select that kernel when you start a new notebook.