forked from google/ffn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity.horovod2
96 lines (78 loc) · 3.64 KB
/
Singularity.horovod2
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
Bootstrap: docker
From: nvidia/cuda:9.0-cudnn7-devel-centos7
%help
Centos7 with cuda9.0 cudnn7
ML/DL packages : tensorflow keras sc-learn
Sci. packages : numpy pandas sc-image matplotlib opencv-python
Basic python : ipython jupyter yaml pygments six zmq wheel h5py tqdm
Development kit : g++/gcc cython nvcc libqt4-dev python-dev
Utility kit : git wget emacs vim openssh-client
To start your container simply try
singularity exec THIS_CONTAINER.simg bash
To use GPUs, try
singularity exec --nv THIS_CONTAINER.simg bash
%labels
Maintainer coreyjadams
Modified by keceli
Version centos7-tf1.11.0-torch0.4.1
#------------
# Global installation
#------------
%environment
# for system
export CUDA_DEVICE_ORDER=PCI_BUS_ID
# Add cupti to the path for profiling:
# export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
# for MPICH:
export PATH=/usr/local/mpich/install/bin/:$PATH
export LD_LIBRARY_PATH=/usr/local/mpich/install/lib/:$LD_LIBRARY_PATH
# source scl_source enable devtoolset-4
export PATH=$PATH:/usr/local/mpich/install/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpich/install/lib
%post
# yum basics
yum update -y
yum groupinstall -y "Development Tools"
yum install -y epel-release
yum install -y wget emacs vim
yum install -y PyQt4 PyQt4-devel
yum install -y emacs vim openssh-clients zip
yum install -y python-devel python-pip python-setuptools
yum install -y hdf5
#mpich
wget -q http://www.mpich.org/static/downloads/3.2.1/mpich-3.2.1.tar.gz
tar xf mpich-3.2.1.tar.gz
rm mpich-3.2.1.tar.gz
cd mpich-3.2.1
# disable the addition of the RPATH to compiled executables
# this allows us to override the MPI libraries to use those
# found via LD_LIBRARY_PATH
./configure --prefix=/usr/local/mpich/install --disable-wrapper-rpath
make -j 4 install
# add to local environment to build pi.c
export PATH=$PATH:/usr/local/mpich//install/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/mpich/install/lib
cd -
# pip basics
pip --no-cache-dir --disable-pip-version-check install --upgrade setuptools
pip --no-cache-dir --disable-pip-version-check install 'matplotlib<3.0' # for python2.7
pip --no-cache-dir --disable-pip-version-check install 'ipython<6.0' # for python2.7
pip --no-cache-dir --disable-pip-version-check install 'ipykernel<5.0' # for python2.7
pip --no-cache-dir --disable-pip-version-check install numpy wheel zmq six pygments pyyaml cython gputil psutil humanize h5py tqdm scipy seaborn tables
pip --no-cache-dir --disable-pip-version-check install pandas scikit-image scikit-learn Pillow opencv-python
pip --no-cache-dir --disable-pip-version-check install jupyter notebook
pip --no-cache-dir --disable-pip-version-check install git+https://github.com/dask/dask.git
# tensorflow
pip --no-cache-dir --disable-pip-version-check install --upgrade tensorflow-gpu==1.11.0
pip --no-cache-dir --disable-pip-version-check install tensorboard
# keras
pip --no-cache-dir --disable-pip-version-check install keras
# tensorflow with mkl-dnn:
pip install https://storage.googleapis.com/intel-optimized-tensorflow/tensorflow-1.11.0-cp27-cp27mu-linux_x86_64.whl
# mpi and horovod
pip --no-cache-dir --disable-pip-version-check install mpi4py
HOROVOD_WITH_TENSORFLOW=1 pip --no-cache-dir --disable-pip-version-check install horovod==0.15.0
# ffn
git clone https://github.com/google/ffn.git
pip --no-cache-dir --disable-pip-version-check install h5py
git clone https://github.com/wushidonguc/distributed_ffn.git