Container definition files for using the PyTorch program with NVIDIA CUDA libraries.
Our recipes are based off of NVIDIA's Pytorch containers, which come prepackaged with many common python libraries, such as scipy, numpy, and matplotlib, and system packages like git, wget, cmake, and vim/nano.
To install Pytorch with conda, see our conda-pytorch recipes.
If you do not need to add any other packages, you can directly use NVIDIA's PyTorch containers in your jobs by adding the following line:
container_image = docker://nvcr.io/nvidia/pytorch:25.10-py3
If you are installing additional packages using Apptainer on CHTC, request 25 GB or more of disk space in your submit file for your build. The build process is disk-heavy!
request_disk = 25 GB
To install packages, add/modify the python3 -m pip install command in the provided files.
We encourage you to use the
python3 -m pip installcommand instead ofpip install, as this will ensure that you are always installing the packages into the version of python that you are using.
If installing multiple packages, it is generally best to place all packages within the same
python3 -m pip install command in case they share dependencies. For example,
python3 -m pip install package1 package2 package3
To specify specific package versions, you can use the built-in pip syntax packagename==version.
For example,
python3 -m pip install package1==1.0 package2==3.2.1 package3