From 4ec40cc3c79202a8fcd60a3282c55b5a06b35060 Mon Sep 17 00:00:00 2001 From: "Wu, Jiantao (PG/R - Comp Sci & Elec Eng)" <jiantao.wu@surrey.ac.uk> Date: Wed, 27 Nov 2024 13:18:05 +0000 Subject: [PATCH] torch2 --- container.def | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/container.def b/container.def index 204172c..2eaedb0 100644 --- a/container.def +++ b/container.def @@ -1,23 +1,31 @@ # Get the base image from nvidia/cuda Docker image. -BootStrap: docker -From: nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04 +Bootstrap: docker +From: docker.io/pytorch/pytorch:2.1.1-cuda12.1-cudnn8-runtime %post # Install special software or additions apt-get update -y # Good practice, update the package database. - apt-get install -y libopenblas-dev # Install the BLAS. + apt-get install -y git apt-get autoremove -y && apt-get autoclean -y # Good practice, to keep the Docker image as small as possible. + conda update -y conda + conda install -y cupy compilers pkg-config "libjpeg-turbo>=3.0.0" opencv numba -c pytorch -c conda-forge + conda install -y pytorch torchvision torchaudio pytorch-cuda=12.1 -c pytorch -c nvidia + conda clean -a + + pip install timm wandb imageio pandas gin-config tqdm scipy + pip cache purge + %environment # Set some environment vars - export PATH=/opt/root/bin:$PATH - export LD_LIBRARY_PATH=/opt/root/lib:$LD_LIBRARY_PATH - export PYTHONPATH=/opt/root/lib + #export PYTHONPATH=/opt/root/lib %runscript # The command that will run when container is started via apptainer run command. - python /opt/root/tutorials/roofit/rf101_basics.py + echo "Container was created $NOW" + echo "Arguments received: $*" + $@ %labels # Add custom metadata to the container. -- GitLab