-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathcutting_edge.singularity
185 lines (155 loc) · 7.04 KB
/
cutting_edge.singularity
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
BootStrap: docker
From: nvidia/cuda:11.3.0-cudnn8-devel-centos8
%runscript
python3 -c "import tensorflow_quantum as tfq"
python3 -c "import tensorflow"
python3 -c "import keras"
python3 -c "import torch;print(torch.cuda.is_available())"
python3.6m -c "import ROOT;import ROOT.TSpectrum as sp;s=sp()"
mkdir -p /tmp/$USER/cuda/
export CUDA_CACHE_PATH=/tmp/$USER/cuda/
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_keras.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_pytorch.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_pnl.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_tfq.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_cirq.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_qulacs.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_pyquil.py
python3 /storage/af/group/gpu/software/gpuservers/scripts/test_sf.py
%files
/storage/af/group/gpu/software/rigetti/forest-sdk-2.23.0-linux-rpm /opt/forest-sdk
# /opt/openmpi-3.1.0 /opt/openmpi-3.1.0
# /storage/af/group/gpu/software/nvidia/nvidia-machine-learning-repo-rhel7-1.0.0-1.x86_64.rpm /opt/nccl.rpm
%post
echo "assumeyes=1" >> /etc/yum.conf
cat /etc/yum.conf
#centos8 went EOL
#https://stackoverflow.com/questions/70926799/centos-through-vm-no-urls-in-mirrorlist
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-*
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-*
yum -y install epel-release
yum -y install which
yum install -y dnf-plugins-core
dnf config-manager --set-enabled powertools
yum -y install emacs-nox
yum -y install git
yum -y install cmake3
#llvm clang
yum -y install llvm llvm-devel llvm-static
PYTHON=38
yum -y install vim-X11 vim-common vim-enhanced vim-minimal
yum -y install python${PYTHON} python${PYTHON}-devel python${PYTHON}-pip python${PYTHON}-tkinter
#yum -y install python${PYTHON}-virtualenv
#TBFyum -y install nvidia-driver
yum -y install openssl-devel
yum -y install openssh-server openssh-clients
yum -y install rsh rsh-server
yum -y install boost boost-devel
#yum -y install nodejs
yum -y install nodejs-1:10.24.0-1.module_el8.3.0+717+fa496f1d.x86_64
npm install -g configurable-http-proxy
### latex ###
yum -y install texlive-pdftex texlive-latex-bin texlive-texconfig* texlive-latex* texlive-metafont* texlive-cmap* texlive-ec texlive-fncychap* texlive-pdftex-def texlive-fancyhdr* texlive-titlesec* texlive-multirow texlive-framed* texlive-wrapfig* texlive-parskip* texlive-caption texlive-ifluatex* texlive-collection-fontsrecommended texlive-collection-latexrecommended dvipng
yum -y install root.x86_64
yum -y install root-spectrum.x86_64
##yum -y install root-notebook
##uses python3.6 == broken
yum -y install python3-root.x86_64
yum -y install python3-jupyroot.x86_64
# for nb convert
yum -y install pandoc
### rigetti SDK quilc, etc
yum install -y lapack-devel blas-devel
cd /opt/forest-sdk/
./forest-sdk-2.23.0-linux-rpm.run --target unt --noexec
cd -
cd /opt/forest-sdk/unt
yum install -y forest-sdk-2.23.0-1.x86_64.rpm
cd -
### python3 packages ###
rm -f /usr/bin/python3 /usr/bin/python
ln -s /usr/bin/python3.8 /usr/bin/python
ln -s /usr/bin/python3.8 /usr/bin/python3
CUDA_PATH=/usr/local/cuda/
LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH
PATH=$CUDA_PATH/bin:$PATH
DYLD_LIBRARY_PATH=$CUDA_PATH/lib:$DYLD_LIBRARY_PATH
CPATH=$CUDA_PATH/include:$CPATH
# MPI_PATH=/opt/openmpi-3.1.0
# PATH=$MPI_PATH/bin/:$PATH
# LD_LIBRARY_PATH=$MPI_PATH/lib/:$LD_LIBRARY_PATH
# OPAL_PREFIX=$MPI_PATH
python3 -m pip install --upgrade pip
python3 -m pip install wheel
## pip install one by one
#utils
python3 -m pip install pycuda
python3 -m pip install cupy-cuda113
python3 -m pip install gpustat
python3 -m pip install setGPU
python3 -m pip install h5py
python3 -m pip install h5sparse
python3 -m pip install tables
python3 -m pip install immutables
python3 -m pip install ipython
python3 -m pip install contextvars==2.1 # fix a dependency issue between jupyter and pyquil
python3 -m pip install jupyter
python3 -m pip install jupyterlab
#python3 -m pip install jupyterhub
python3 -m pip install matplotlib
python3 -m pip install numba
python3 -m pip install numexpr
python3 -m pip install pandas
python3 -m pip install pydot
python3 -m pip install networkx
python3 -m pip install PyWavelets
python3 -m pip install seaborn
python3 -m pip install tqdm
jupyter serverextension enable --py jupyterlab --sys-prefix
python3 -m ipykernel install
#hep
python3 -m pip install EnergyFlow
python3 -m pip install hepunits
python3 -m pip install asdf==2.4.2 # dependency issue between hepstats and pennylane thourhg semnantic-version
python3 -m pip install scikit-hep
python3 -m pip install pyjet
python3 -m pip install fastjet
python3 -m pip install coffea
#deep learning
python3 -m pip install graph-nets
python3 -m pip install gym
python3 -m pip install scikit-learn
python3 -m pip install scikit-image
python3 -m pip install scikit-optimize
python3 -m pip install deap
python3 -m pip install xgboost
#version is limited due to tf-quantum
python3 -m pip install tensorflow==2.7.0
#python3 -m pip install Keras
python3 -m pip install keras-rl
python3 -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
python3 -m pip install torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.11.0+cu113.html
#quantum
python3 -m pip install dwave-ocean-sdk
python3 -m pip install qulacs-gpu
python3 -m pip install pennylane-qulacs["gpu"]
python3 -m pip install tensorflow-quantum
python3 -m pip install strawberryfields
python3 -m pip install cirq==1.0.0
python3 -m pip install qsimcirq
python3 -m pip install qiskit==0.19.0
#SDK unavailable python3 -m pip install pyquil
### horovod with NCCL, and MPI
#rpm -i /opt/nccl.rpm
#yum -y update
#yum -y install libnccl libnccl-devel libnccl-static
#HOROVOD_NCCL_INCLUDE=/usr/include HOROVOD_NCCL_LIB=/usr/lib64 HOROVOD_GPU_ALLREDUCE=NCCL HOROVOD_WITH_MPI=1 HOROVOD_GPU_ALLGATHER=MPI HOROVOD_GPU_BROADCAST=MPI HOROVOD_ALLOW_MIXED_GPU_IMPL=1 pip3 install --no-cache-dir git+https://github.com/horovod/horovod.git
%environment
JUPYTER_RUNTIME_DIR=$HOME/jupyter-runtime
CUDA_PATH=/usr/local/cuda/
LD_LIBRARY_PATH=$CUDA_PATH/lib64:$LD_LIBRARY_PATH
PATH=$CUDA_PATH/bin:$PATH
# MPI_PATH=/opt/openmpi-3.1.0
# PATH=$MPI_PATH/bin:$PATH
# LD_LIBRARY_PATH=$MPI_PATH/lib:$LD_LIBRARY_PATH
# OPAL_PREFIX=$MPI_PATH