-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapptainerfile.def
More file actions
80 lines (67 loc) · 2.17 KB
/
apptainerfile.def
File metadata and controls
80 lines (67 loc) · 2.17 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Bootstrap: localimage
From: pytorch_26.01-py3.sif
Stage: base
%environment
export RUNNING_IN_DOCKER=TRUE
export TERM=xterm-256color
%files
requirements.txt requirements.txt
%post
RUNNING_IN_DOCKER=TRUE
TERM=xterm-256color
echo "PS1='\e[97m\u\e[0m@\e[94m\h\e[0m:\e[35m\w\e[0m# '" >> /root/.bashrc
apt-get update && apt-get install -y --no-install-recommends \
sudo \
htop \
cifs-utils \
winbind \
smbclient \
sshfs \
iputils-ping \
google-perftools \
libgoogle-perftools-dev \
graphviz \
zsh \
vmtouch \
fio \
prometheus \
autoconf \
libxslt-dev \
xsltproc \
docbook-xsl \
libnuma-dev \
software-properties-common \
&& rm -rf /var/lib/apt/lists/*
echo "Install apptainer"
add-apt-repository -y ppa:apptainer/ppa
apt-get update && apt-get install -y apptainer && rm -rf /var/lib/apt/lists/*
echo "Installing grafana"
mkdir -p /etc/apt/keyrings/ && \
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | tee /etc/apt/keyrings/grafana.gpg > /dev/null && \
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | tee -a /etc/apt/sources.list.d/grafana.list && \
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com beta main" | tee -a /etc/apt/sources.list.d/grafana.list
apt-get update && \
apt-get install -y grafana && \
apt-get install -y grafana-enterprise && \
rm -rf /var/lib/apt/lists/*
echo "Install ohmyzsh"
sh -c "$(wget https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
echo "Install additional dependencies"
# needs to have
# sudo mount --bind ~/.cache/pip /tmp/pip
pip list
pip install -r requirements.txt --progress-bar off --cache-dir /tmp/pip
pip list
echo "Install ops3d kernels"
IF [ "$(uname -m)" = "x86_64" ]; then
pip install https://raw.githubusercontent.com/cell-observatory/ops3d/main/dist/ops3d-0.1.0-cp312-cp312-linux_x86_64.whl
elif [ "$(uname -m)" = "aarch64" ]; then
pip install https://raw.githubusercontent.com/cell-observatory/ops3d/main/dist/ops3d-0.1.0-cp312-cp312-linux_aarch64.whl
else
echo "Unsupported architecture"
exit 1
fi
%runscript
exec /bin/bash -l -c "$@"
%startscript
exec /bin/bash -l -c "$@"