hpc-containers
  • Introduction
  • Docker
    • Fundamentals
    • Installation
    • Get started
    • Dockerfile
    • Advanced
    • Commands
  • Singularity
    • Installing
    • Running a container
      • Hands-on #1
    • Building a container: Configuration file
      • Hands-on #2
      • Hands-on #3
    • Building a container: Docker
      • Hands-on #4
    • Hands-on #5: TensorFlow and GPU
Powered by GitBook
On this page
  1. Singularity

Hands-on #5: TensorFlow and GPU

TensorFlow configuration file

BootStrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
%post
  yum -y groupinstall "Development Tools"
  yum -y install epel-release which
  yum -y install python-devel python-pip python34-devel python34-pip
  pip install tensorflow
  pip3 install tensorflow
%runscript
  python3 "$@"

TensorFlow GPU configuration file

BootStrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
%post
  yum -y groupinstall "Development Tools"
  yum -y install epel-release which
  yum -y install python-devel python-pip python34-devel python34-pip
  pip install tensorflow-gpu
  pip3 install tensorflow-gpu
%runscript
  python3 "$@"

Running TensorFlow on Wilkes compute cluster

module load singularity cuda/8.0 cudnn/5.1_cuda-8.0
singularity run --nv --bind /usr/local/Cluster-Apps tensorflow-gpu.img tflow-gpu-test.py
PreviousHands-on #4

Last updated 7 years ago