Skip to content
Snippets Groups Projects
Commit ef4f6729 authored by Marty Kandes's avatar Marty Kandes
Browse files

naked-singularity-v0.0.2 :: added tensorflow-cpu.def; cpu-only version

of tensorflow for running on comet
parent 87677fab
Branches
No related tags found
No related merge requests found
Bootstrap: debootstrap
MirrorURL: http://us.archive.ubuntu.com/ubuntu
OSVersion: xenial
%labels
AUTHOR_NAME Marty Kandes
AUTHOR_EMAIL mkandes@sdsc.edu
OPERATING_SYSTEM_NAME ubuntu
OPERATING_SYSTEM_VERSION 16.04
APPLICATION_NAME tensorflow
APPLICATION_VERSION 1.2
SYSTEM_NAME comet
SYSTEM_SINGULARITY_VERSION 2.2
VERSION 0.0.1
LAST_UPDATED 20170710
%setup
%environment
%post -c /bin/bash
declare -r MIRRORURL='http://us.archive.ubuntu.com/ubuntu'
declare -r OSVERSION='xenial'
apt-get -y install ubuntu-minimal
apt-get -y install ubuntu-standard
apt-get -y install ubuntu-server
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION} multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-updates multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-backports multiverse"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security main"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security restricted"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security universe"
add-apt-repository -y "deb ${MIRRORURL} ${OSVERSION}-security multiverse"
apt-get -y update && apt-get -y upgrade
mkdir /cvmfs /oasis /projects /scratch
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
apt-get -y update
apt-get -y install bazel
apt-get -y install expect
apt-get -y install python-numpy
apt-get -y install python-dev
apt-get -y install python-pip
apt-get -y install python-wheel
cd /opt
git clone https://github.com/tensorflow/tensorflow
cd /opt/tensorflow
git checkout r1.2
echo '#!/usr/bin/expect -f' > configure.exp
echo 'spawn ./configure' >> configure.exp
echo 'expect "Please specify the location of python. \[Default is /usr/bin/python\]: "' >> configure.exp
echo 'send "/usr/bin/python\r"' >> configure.exp
echo 'expect "Please input the desired Python library path to use. Default is \[/usr/local/lib/python2.7/dist-packages\]\r"' >> configure.exp
echo 'send "/usr/local/lib/python2.7/dist-packages\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with MKL support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Please specify optimization flags to use during compilation when bazel option \"--config=opt\" is specified \[Default is -march=native\]: "' >> configure.exp
echo 'send " -march=native\r"' >> configure.exp
echo 'expect "Do you wish to use jemalloc as the malloc implementation? \[Y/n\] "' >> configure.exp
echo 'send "Y\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with Google Cloud Platform support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with Hadoop File System support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with the XLA just-in-time compiler (experimental)? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with VERBS support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with OpenCL support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "Do you wish to build TensorFlow with CUDA support? \[y/N\] "' >> configure.exp
echo 'send "N\r"' >> configure.exp
echo 'expect "> "' >> configure.exp
chmod +x configure.exp
./configure.exp
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
export LC_ALL=C
pip install /tmp/tensorflow_pkg/tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl
%files
%runscript
%test
time -p python /opt/tensorflow/tensorflow/examples/tutorials/mnist/mnist_deep.py
...@@ -12,7 +12,8 @@ OSVersion: xenial ...@@ -12,7 +12,8 @@ OSVersion: xenial
APPLICATION_VERSION none APPLICATION_VERSION none
SYSTEM_NAME comet SYSTEM_NAME comet
SYSTEM_SINGULARITY_VERSION 2.2 SYSTEM_SINGULARITY_VERSION 2.2
VERSION 0.0.1 VERSION 0.0.2
LAST_UPDATED 20170710
%setup %setup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment