NVIDIA offers PhysicsNemo-SYM in a pre-defined container in their NVIDIA Container Registry:
docker pull nvcr.io/nvidia/physicsnemo/physicsnemo:<tag>This means that, if you have apptainer installed (on how to install Apptainer, see their guide here).
The physicsnemo2506.def here can be built
apptainer build physicsnemo2506_container.sif physicsnemo2506.defAnd it can either be run interactively
apptainer run physicsnemo2506_container.sifor added as a kernel to Jupyter in your local space; to do so, we need to create the folder
mkdir -p ~/.local/share/jupyter/kernels/physicsnemo2506and then create the kernel.json file (e.g., via vim or nano)
{
"display_name": "PhysicsNemo 2506",
"argv": [
"/usr/bin/apptainer",
"run",
"--nv",
"--bind",
"/home",
"/path/to/physicsnemo2506_container.sif",
"python3",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"language": "python",
"metadata": {
"debugger": true
},
"env": {
"LD_LIBRARY_PATH": ":/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/.singularity.d/libs:/usr/local/lib/python3.12/dist-packages/nvidia/cudnn"
}
}
Notice that we added in the env section the LD_LIBRARY_PATH env var, adding to the original one the path to cudnn as /usr/local/lib/python3.12/dist-packages/nvidia/cudnn.
The course will be divided in frontal lectures and hands on lectures; this repository contains the code for the hands on sessions.