Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions software/Conda/conda-pytorch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM continuumio/miniconda3:latest
FROM condaforge/miniforge3:25.3.0-3

RUN conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
RUN CONDA_OVERRIDE_CUDA=12.9 conda install --channel conda-forge pytorch-gpu torchvision torchaudio cuda-version=12.9
20 changes: 11 additions & 9 deletions software/Conda/conda-pytorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,30 @@ This recipe is especially useful for
* installing older versions of PyTorch, which may not have official containers on DockerHub
* installing PyTorch in combination with other conda packages

## Build Notes
## Choosing a CUDA Version

* Our recipes use CUDA 12.9, since they are compatible with most of our GPU machines.
* You may consider using CUDA 13 instead. However, note that they will not be backwards compatible with older machines. We recommend using `gpus_minimum_capability = 8.0` in your HTCondor submit files when using jobs with containers with CUDA 13.

Installation command taken from the [PyTorch website](https://pytorch.org/get-started/locally/) using the options "Stable, Linux, Conda, Python, CUDA 12.1".

## [conda-pytorch.def](conda-pytorch.def)

| | | |
| ---: | :--- | :--- |
| *Type* | **Apptainer** | |
| *OS* | Debian "bullseye" | |
| *Base image* | **continuumio/miniconda3:latest** | *DockerHub* |
| *Updated* | 2024-04-15 | *Andrew Owen* |
| *Last tested on HTC* | 2024-04-15 | *Andrew Owen* |
| *OS* | Ubuntu 24.04.02 LTS | |
| *Base image* | **condaforge/miniforge3:25.3.0-3** | *DockerHub* |
| *Updated* | 2025-11-18 | *Amber Lim* |
| *Last tested on HTC* | 2025-11-18 | *Amber lim, Matthew Feickert* |
| *Last tested on HPC* | - | - |

## [Dockerfile](Dockerfile)

| | | |
| ---: | :--- | :--- |
| *Type* | **Dockerfile** | |
| *OS* | Debian "bullseye" | |
| *Base image* | **continuumio/miniconda3:latest** | *DockerHub* |
| *Updated* | 2024-05-10 | *Andrew Owen* |
| *OS* | Ubuntu 24.04.02 LTS | |
| *Base image* | **condaforge/miniforge3:25.3.0-3** | *DockerHub* |
| *Updated* | 2025-11-18 | *Amber Lim, Matthew Feickert* |
| *Last tested on HTC* | - | - |
| *Last tested on HPC* | - | - |
4 changes: 2 additions & 2 deletions software/Conda/conda-pytorch/conda-pytorch.def
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Bootstrap: docker
From: continuumio/miniconda3:latest
From: condaforge/miniforge3:25.3.0-3

%post
conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia
CONDA_OVERRIDE_CUDA=12.9 conda install --channel conda-forge pytorch-gpu torchvision torchaudio cuda-version=12.9
2 changes: 1 addition & 1 deletion software/PyTorch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Container definition files for using the PyTorch program with NVIDIA CUDA librar

Our recipes are based off of [NVIDIA's Pytorch containers](https://catalog.ngc.nvidia.com/orgs/nvidia/containers/pytorch), which come prepackaged with many common python libraries, such as `scipy`, `numpy`, and `matplotlib`, and system packages like `git`, `wget`, `cmake`, and `vim`/`nano`.

Conda's version of Pytorch is deprecated. You will no longer be able to use Conda to install Pytorch.
To install Pytorch with conda, see our [conda-pytorch recipes](../Conda/conda-pytorch/).

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:

Expand Down