-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSingularity20190305
51 lines (48 loc) · 1.95 KB
/
Singularity20190305
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
Bootstrap:docker
From:nvidia/cuda:10.0-cudnn7-devel-centos7
%environment
export KERAS_BACKEND=tensorflow
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64
%post
# General Python packages
PYTHON3_PACKAGES="tensorflow-gpu numpy<1.15.0 keras pillow scikit-learn pandas pandas_ml mxnet"
PYTHON2_PACKAGES="tensorflow-gpu numpy<1.15.0 keras pillow scikit-learn pandas mxnet"
yum install -y epel-release
yum clean all && yum makecache
yum update -y
yum install -y @"Development Tools"
yum install -y libgomp cmake3 vim cuda
yum install -y git gcc-c++ sudo curl openblas lapack python36 wget python-devel python36-devel openssl-devel curl-devel
# Install all the python bits
wget https://bootstrap.pypa.io/get-pip.py
python36 get-pip.py
python2 get-pip.py
python36 -m pip install $PYTHON3_PACKAGES
python2 -m pip install $PYTHON2_PACKAGES
# install R
## Turn off nodoc as that ruins R apparently
# sed -i 's/tsflags=nodocs//g' /etc/yum.conf
# or use --setopt=tsflags= to do it per invocation
yum install -y --setopt=tsflags= R-core
yum install -y R-core-devel R-devel R-Rcpp R-Rcpp-devel
ls -la /usr/share/doc/R-3.5.2/html/packages.html
# R packages
R --no-save <<EOL
install.packages("pkgbuild", repos="https://mirror.las.iastate.edu/CRAN/")
install.packages("devtools", repos="https://mirror.las.iastate.edu/CRAN/")
options(devtools.install.args = c("--no-multiarch", "--no-test-load", "--no-html","--nodoc"))
#install.packages("tidyselect", repos="https://mirror.las.iastate.edu/CRAN/")
library(devtools)
devtools::install_github("rstudio/tensorflow")
library(tensorflow)
try(devtools::install_github("rstudio/keras"))
library(keras)
EOL
# Pytorch stuff
python36 -m pip install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
python36 -m pip install torchvision
python2 -m pip install https://download.pytorch.org/whl/cu100/torch-1.0.1.post2-cp27-cp27mu-linux_x86_64.whl
python2 -m pip install torchvision
%runscript
exec $@