Commit 321e3aea authored by Andreas Gocht's avatar Andreas Gocht

add tf support

parent 597e4cf7
Bootstrap: docker
From: ubuntu:xenial
Namespace: amd64
%help
"This container uses debian testing with OpenMPI and mpi4py. It has a build-in Score-P support."
"Building and tracing apps using Score-P for gcc, g++, gfortran and python2/3 should work."
"For scorep have a look to http://www.vi-hps.org/projects/score-p/ ."
"For python tracing, please have a look to https://github.com/score-p/scorep_binding_python ."
"keep changes: http://singularity.lbl.gov/docs-build-container#--writable"
%runscript
echo "This is what happens when you run the container..."
%files
mca-btl-openib-device-params.ini /tmp/
cudnn-9.0-linux-x64-v7.1.tgz /tmp/
%post
......@@ -91,7 +93,7 @@ From: ubuntu:xenial
svn co --username scorep --password foo42bar --non-interactive https://silc.zih.tu-dresden.de/svn/hooks-root/afs-dev/tags/REL-06/
cd REL-06/
./install-scorep-dev.06.sh --prefix=/usr/local
./install-afs-dev.02.sh --prefix=/usr/local
export PATH=/usr/local/bin:$PATH
......@@ -149,23 +151,82 @@ From: ubuntu:xenial
pip3 install mpi4py
###################################
# espressopp
# Tensorflow
###################################
## need to build own libboost
# apt-get -y install libfftw3-dev
# apt-get -y install libboost-dev libboost-mpi-dev libboost-python-dev libboost-serialization-dev libboost-system-dev libboost-filesystem-dev
# apt-get -y install python-numpy
#
# cd /apps
#
# if [ ! -d espressopp ]; then
# git clone https://github.com/espressopp/espressopp.git
# cd espressopp
# mkdir build
# cd build
# SCOREP_WRAPPER=off cmake -DEXTERNAL_BOOST=ON -DEXTERNAL_MPI4PY=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_COMPILER='scorep-mpicxx' -DCMAKE_Fortran_COMPILER='scorep-mpif90' -DCMAKE_C_COMPILER='scorep-mpicc' ..
# make -j 4
# make install
# fi
cd /apps
apt-get -y install build-essential openjdk-8-jdk python3 zip
if [ ! -d bazel ]; then
mkdir bazel
cd bazel
wget https://github.com/bazelbuild/bazel/releases/download/0.11.0/bazel-0.11.0-dist.zip
unzip bazel-0.11.0-dist.zip
./compile.sh
fi
export PATH=$PATH:/apps/bazel/output/
apt-get -y install python3-numpy python3-dev python3-pip python3-wheel
cd /apps
if [ ! -d tensorflow-dep ]; then
mkdir tensorflow-dep
cd tensorflow-dep
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
apt-get -y update
apt-get -y install cuda-9-0
apt-get -y install cuda-command-line-tools-9-0
cp /tmp/cudnn-9.0-linux-x64-v7.1.tgz ./
tar -xf cudnn-9.0-linux-x64-v7.1.tgz
fi
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64
cd /apps
if [ ! -d tensorflow ]; then
git clone https://github.com/tensorflow/tensorflow
fi
cd tensorflow
git checkout v1.6.0
export TF_NEED_CUDA=1
export TF_NEED_MPI=1
export PYTHON_BIN_PATH=/usr/bin/python3
export PYTHON_LIB_PATH="/usr/local/lib/python3.5/dist-packages/"
export PYTHONPATH=$(pwd)/lib
export PYTHON_ARG=$(pwd)/lib
export CUDA_TOOLKIT_PATH=/usr/local/cuda
export CUDNN_INSTALL_PATH=/apps/tensorflow-dep/cuda
export TF_NEED_GCP=0
export TF_CUDA_VERSION="9.0"
export TF_CUDA_COMPUTE_CAPABILITIES=3.0
export TF_NEED_HDFS=0
export TF_NEED_OPENCL=0
export TF_NEED_JEMALLOC=1
export TF_ENABLE_XLA=0
export TF_NEED_VERBS=0
export TF_CUDA_CLANG=0
export TF_CUDNN_VERSION="7.1"
export TF_NEED_MKL=0
export TF_DOWNLOAD_MKL=0
./configure
bazel build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" --config=opt --config=cuda //tensorflow/tools/pip_package:build_pip_package
#pip3 install /tmp/tensorflow_pkg/*.whl
# https://gist.github.com/PatWie/0c915d5be59a518f934392219ca65c3d
# export TF_NEED_CUDA=1
# export TF_NEED_MPI=1
# TODO CUDNN
#/apps/bazel/output/bazel
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment