-
Notifications
You must be signed in to change notification settings - Fork 3
/
singularity.def
60 lines (51 loc) · 1.81 KB
/
singularity.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
47
48
49
50
51
52
53
54
55
56
57
58
59
Bootstrap: docker
From: nvidia/cuda:12.4.0-devel-ubuntu22.04
%files
./CMakeLists.txt .
./pyproject.toml .
./LICENSE .
./src .
%post
apt-get update -y
apt-get install -y git wget
apt-get install -y build-essential
apt-get install -y curl
apt-get install -y llvm
apt-get install -y libhdf5-dev
apt-get install -y rapidjson-dev
apt-get install -y cmake
apt-get install -y libsqlite3-dev
apt-get install -y build-essential
apt-get install -y zlib1g-dev
apt-get install -y libbz2-dev
apt-get install -y libreadline-dev
apt-get install -y liblzma-dev
export PYENV_ROOT=/opt/pyenv
export PATH="/opt/pyenv/bin:$PATH"
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
pyenv install 3.12.4
echo 'export PATH=/opt/pyenv/versions/3.12.4/bin/:$PATH' >> $SINGULARITY_ENVIRONMENT
export PATH=/opt/pyenv/versions/3.12.4/bin/:$PATH
wget https://root.cern/download/root_v6.32.02.Linux-almalinux9.4-x86_64-gcc11.4.tar.gz
tar -xzvf root_v6.32.02.Linux-almalinux9.4-x86_64-gcc11.4.tar.gz
rm root_v6.32.02.Linux-almalinux9.4-x86_64-gcc11.4.tar.gz
export HOME=$PWD
export ROOTSYS=$HOME/root
%environment
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$ROOTSYS/cmake
export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0+PTX"
export PATH=$ROOTSYS/bin:$PATH
%appinstall install
cd $HOME
export ROOTSYS=$HOME/root
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib
export CMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH:$ROOTSYS/cmake
export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0+PTX"
export PATH=$ROOTSYS/bin:$PATH
pip install -v .
pip install -v .
%runscript studies
echo "Argument: $*"
%runscript model
echo "Argument: $*"