-
Notifications
You must be signed in to change notification settings - Fork 0
/
Singularity1
31 lines (24 loc) · 1.05 KB
/
Singularity1
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
BootStrap: debootstrap
OSVersion: xenial
MirrorURL: http://archive.ubuntu.com/ubuntu/
%post
sed -i 's/main/main restricted universe/g' /etc/apt/sources.list
apt-get update
# Install R, Python, misc. utilities
apt-get install -y libopenblas-dev r-base-core libcurl4-openssl-dev libopenmpi-dev openmpi-bin openmpi-common openmpi-doc openssh-client openssh-server libssh-dev wget vim git nano git cmake libcairo-dev gfortran g++ curl wget python autoconf bzip2 libtool libtool-bin python-pip python-dev
apt-get clean
locale-gen en_US.UTF-8
# Install Tensorflow
pip install tensorflow
# Install required R packages
R --slave -e 'install.packages("devtools", repos="https://cloud.r-project.org/")'
R --slave -e 'devtools::install_github("rstudio/tensorflow")'
%test
#!/bin/sh
exec R --slave -e "library(tensorflow); \
sess <- tensorflow::tf\$Session(); \
hello <- tensorflow::tf\$constant('Hello, TensorFlow!'); \
sess\$run(hello)"
%runscript
#!/bin/bash
Rscript --slave "main.R"