Project

General

Profile

Support #5451

Instll Tensorflow 1.15.0 with Virtual Environment

Added by Albert van Eck about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Start date:
2019-11-13
Due date:
% Done:

100%

Estimated time:
6.00 h
Spent time:

Description

Tensorflow 1.15.0 installed with Horovod and Keras

Please follow these instructions:

Log in to the HPC
execute the command:
module load intelpython/3.6

execute the command:
conda init bash

Log out of the HPC and log back in again
Your prompt should change to look like:
(base) [oriolao@login ~]

Execute the following command:
cat $(which install_tensorflow)

Execute the commands that are displayed on the screen, you can execute it line by line to see what the results are. Note that after the command: cat > $APP_MODULE_FILE <<EOF no output will be displayed. This part actually creates a “here document” and will add all the commands into a file, up to the line that reads EOF
Example:

module purge

module load hpc || exit 1

APP_DISPLAYNAME=TensorFlow-GPU

APP_NAME=$(echo $APP_DISPLAYNAME |sed "s|-.*||g"| tr 'A-Z' 'a-z')

APP_SHORTNAME=$(echo $APP_NAME |tr 'a-z' 'A-Z' )

APP_MAJOR_VER=1.15

......

......

EOF

Tensorflow and Tensoflow-gpu should now be installed in a virtual environment. You only have to execute steps 1 to 7 once.

Thereafter, when you log into the HPC, you can execute the following to load the environment for Tensorflow:
module load tensorflow

tensorflow_init

#execute your python scripts here

#To exit from the Tensorflow environment, just close the shell or execute:

tensorflow_exit

The abovementioned steps 1 to 7 will install Tensorflow 1.15.0 . I had issues with some test code using Tensorflow v 2.0.0, so I decided to perform the installation for version 1.15.0. I have also not extensively tested TensorFlow with the GPUs but it should work on the GPU servers. If your code is GPU ready, we can test it on the GPU servers at a later time.

I hope this helps. Let me know if you would want me to execute it on your behalf.

History

#1 Updated by Albert van Eck about 5 years ago

  • Status changed from New to Closed

Also available in: Atom PDF