-
Notifications
You must be signed in to change notification settings - Fork 13
/
advprompter.def
34 lines (31 loc) · 1.01 KB
/
advprompter.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
BootStrap: docker
From: nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
%files
./requirements.txt /home/requirements.txt
%post
TZ=Etc/UTC && \
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \
echo $TZ > /etc/timezone
# packages
apt-get update
apt-get install -y wget build-essential git-all
apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa -y
apt-get update
apt-get install -y python3.11 python3-pip
# python
python3.11 -m pip install --no-cache-dir torch==2.2.2 --index-url https://download.pytorch.org/whl/cu121
python3.11 -m pip install --no-cache-dir -r /home/requirements.txt
%environment
export DEBIAN_FRONTEND=noninteractive
export PIP_REQUIRE_VIRTUALENV=false
%runscript
%startscript
%test
# test if everything is installed correctly and imports with issues work
python3.11 --version
python3.11 -c 'import torch; print(f"torch={torch.__version__}")'
%labels
Author Anselm Paulus
Version v0.0.1
%help