forked from lpjiang97/dynamic-predictive-coding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapptainer.def
47 lines (36 loc) · 1.2 KB
/
apptainer.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
35
36
37
38
39
40
41
42
43
44
45
46
Bootstrap: docker
From: nvcr.io/nvidia/pytorch:22.11-py3
%setup
# Append the Slurm UID/GID from the node to the container:
grep ^slurm: /etc/passwd >> ${APPTAINER_ROOTFS}/etc/passwd
grep ^slurm: /etc/group >> ${APPTAINER_ROOTFS}/etc/group
%files
# Copy the Hyak Slurm repository and the Hyak user tools
# libraries and executables:
/etc/yum.repos.d/hyak-slurm.repo
/opt/hyak-user-tools
/usr/local/bin/hyak*
%environment
export SDL_VIDEODRIVER=x11
export LIBGL_ALWAYS_INDIRECT=1
%post
export DEBIAN_FRONTEND=noninteractive
apt-get -y update
apt-get install --no-install-recommends -y swig xauth build-essential libsdl2-dev python3-tk texlive-latex-extra cm-super dvipng
pip install -r /mnt/requirements.txt
mkdir /scr /mmfs1
ln --symbolic /mmfs1/sw /sw
ln --symbolic /mmfs1/data /data
ln --symbolic /mmfs1/gscratch /gscratch
unset DEBIAN_FRONTEND
%runscript
case ${@} in
"")
# Launch an interactive shell if no arguments are given:
exec /bin/bash
;;
*)
# If any arguments are given, attempt to run them as a command:
exec ${@}
;;
esac