-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.gpu
22 lines (17 loc) · 1.15 KB
/
Singularity.gpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Bootstrap: docker
From: mambaorg/micromamba
%post
apt-get update
apt-get install -y wget git # gcc
wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb
dpkg -i cuda-keyring_1.1-1_all.deb
echo "deb [signed-by=/usr/share/keyrings/cuda-archive-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/ /" | tee /etc/apt/sources.list.d/cuda-debian12-x86_64.list
sed -i '0,/Components: main/s//Components: main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources
apt-get update
apt-get -y install cuda-drivers # driver is enough, cuda gets installed via mamba
channels="-c conda-forge -c pytorch -c nvidia "
micromamba install --yes --name base -c conda-forge -c pytorch -c nvidia pytorch torchvision torchaudio pytorch-cuda=11.8 openai langchain huggingface_hub transformers sentence-transformers einops accelerate pypdf chromadb gradio jupyter
micromamba run pip install bitsandbytes InstructorEmbedding git+https://github.com/huggingface/diffusers
micromamba clean -aqy
%runscript
micromamba run -p /opt/conda "$@"