Skip to content
Snippets Groups Projects
Select Git revision
  • 5c354911e6f284fb817037711ccd190a38e9b6e1
  • master default protected
  • replication_test
  • dev protected
  • release-1.10 protected
  • release-1.9 protected
  • 551-init-broker-service-permissions
  • 549-test-oai-pmh
  • 545-saving-multiple-times-breaks-pid-metadata
  • 499-standalone-compute-service-2
  • 539-load-tests
  • hotfix/helm-chart
  • luca_ba_new_interface
  • 534-bug-when-adding-access-to-user-that-is-not-registered-at-dashboard-service
  • release-1.8 protected
  • 533-integrate-semantic-recommendation
  • feature/openshift
  • 518-spark-doesn-t-map-the-headers-correct
  • 485-fixity-checks
  • 530-various-schema-problems-with-subsets
  • release-1.7 protected
  • v1.10.2 protected
  • v1.10.1 protected
  • v1.10.0-rc13 protected
  • v1.10.0-rc12 protected
  • v1.10.0-rc11 protected
  • v1.10.0-rc10 protected
  • v1.10.0-rc9 protected
  • v1.10.0-rc8 protected
  • v1.10.0-rc7 protected
  • v1.10.0-rc6 protected
  • v1.10.0-rc5 protected
  • v1.10.0-rc4 protected
  • v1.10.0-rc3 protected
  • v1.10.0-rc2 protected
  • v1.10.0rc1 protected
  • v1.10.0rc0 protected
  • v1.10.0 protected
  • v1.9.3 protected
  • v1.9.2 protected
  • v1.9.2-rc0 protected
41 results

Makefile

Blame
  • tensorflow-cpu.def 4.67 KiB
    Bootstrap: debootstrap
    MirrorURL: http://us.archive.ubuntu.com/ubuntu
    OSVersion: xenial
    
    %labels
    
        AUTHOR_NAME Marty Kandes
        AUTHOR_EMAIL mkandes@sdsc.edu
        APPLICATION_NAME tensorflow
        APPLICATION_VERSION 1.2
        APPLICATION_URL https://www.tensorflow.org/
        SYSTEM_NAME comet
        SYSTEM_SINGULARITY_VERSION 2.2
        SYSTEM_URL http://www.sdsc.edu/support/user_guides/comet.html
        VERSION 0.0.3
        LAST_UPDATED 20170721
    
    %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