In order to successfully complete this assignment you need to participate both individually and in groups during class. If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class on Wednesday April 14. If you are attending asynchronously, turn in your assignment using D2L no later than _11:59pm on Wednesday April 14.
Instructions for installing Tensorflow can be found here:
https://wiki.hpcc.msu.edu/display/ITH/General+notes+and+installation+via+Python+virtualenv
This includes the following instructions to reset the HPC Environment:
module purge
module load Python
module load CUDA
module load cuDNN
The next step is to make something called a python virtual environment. If you are not using these, you should, they are cool and help you sandbox module installations:
#Setup and activeate a new python vertual enviornment
virtualenv -p python3 tf2env
source tf2env/bin/activate
Once we have our new python enviornment set-up we need to install some programs:
#Install needed libraries
pip3 install --upgrade tensorflow-gpu keras
...and, set some enviornment variables.
module purge
module load Python
module load CUDA
module load cuDNN
source tf2env/bin/activate
The final step is to see if this thing works:
cp /opt/software/hpc_examples/examples/.Tensorflow/convolutional.py .
time python $convolutional.py
The above doesn't quite work. See following stack overflow for a discussion of the problem and a potential solution;
https://stackoverflow.com/questions/58258003/attributeerror-module-tensorflow-has-no-attribute-app
...and, set some enviornment variables.
module purge
module load CUDA/10.0.130
module load cuDNN/7.5.0.56-CUDA-10.0.130
module load GCC/5.4.0-2.26 OpenMPI/1.10.3
module load Python/3.5.2
source tf2env/bin/activate
The final step is to see if this thing works:
export TENSORFLOWPROGRAM=/opt/software/hpc_examples/examples/Tensorflow/convolutional.py
time python $TENSORFLOWPROGRAM
If you attend class in-person then have one of the instructors check your notebook and sign you out before leaving class. If you are attending asynchronously, turn in your assignment using D2L.
Written by Dr. Dirk Colbry, Michigan State University
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.