Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:services:application_services:high_performance_computing:tensorflow [2019/04/09 14:09]
akhuziy [Testing the installation]
en:services:application_services:high_performance_computing:tensorflow [2020/03/27 09:58] (current)
akhuziy [Installing TensorFlow]
Line 3: Line 3:
  
 ==== Installing TensorFlow ==== ==== Installing TensorFlow ====
-It is recommended to use the python tools [[https://​virtualenv.pypa.io/​en/​stable/​userguide/​|virtualenv]] and [[https://​pip.pypa.io/​en/​stable/​quickstart/​|pip]] to create a virtual python environment and install the desired version of tensorflow within that environment.+It is recommended to use the python tools [[https://​virtualenv.pypa.io/​en/​latest/user_guide.html|virtualenv]] and [[https://​pip.pypa.io/​en/​stable/​quickstart/​|pip]] to create a virtual python environment and install the desired version of tensorflow within that environment.
 <​code>​ <​code>​
-module load python/3.5.1+module load python/3.6.3
 virtualenv <​your_virtual_env>​ virtualenv <​your_virtual_env>​
 cd <​your_virtual_env>​ cd <​your_virtual_env>​
 source bin/​activate source bin/​activate
 pip install --upgrade pip pip install --upgrade pip
-pip install tensorflow-gpu==1.12.0+pip install tensorflow-gpu==1.15.0
 </​code>​ </​code>​
-If you do not want to use GPUs simply replace the last line with <​code>​pip install tensorflow</​code>​+If you do not want to use GPUs simply replace the last line with <​code>​pip install tensorflow==1.15.0</​code>​
  
 ==== Testing the installation ==== ==== Testing the installation ====
Line 20: Line 20:
 #SBATCH -p gpu #SBATCH -p gpu
 #SBATCH -t 1 #SBATCH -t 1
-#SBATCH --gres=gpu:+#SBATCH --gpus-per-node ​
-  + 
-module load cuda90/toolkit/9.0.176 +module load cuda10.0/toolkit/10.0.130 
-module load cuda90/blas/9.0.176 +module load cuda10.0/blas/10.0.130 
-module load cudnn/90v7.3.1+module load cudnn/10.0v7.6.3
    
 python tftest.py python tftest.py
Line 35: Line 35:
 print(sess.run(hello)) print(sess.run(hello))
 </​file>​ </​file>​
 +And then submit the job using Slurm: <code bash>
 +sbatch jobscript.sh</​code>​
  
-The out-ID.txt ​file should contain+The output ​file should contain
 <​code>​ <​code>​
 The output (if any) follows: The output (if any) follows:
  
 b'​Hello,​ TensorFlow!'</​code>​ b'​Hello,​ TensorFlow!'</​code>​
-and the err-ID.txt file contains ​information about the GPUs selected.+and also information about the GPUs selected.
  
 === Testing CPU only installation === === Testing CPU only installation ===
Line 47: Line 49:
  
 ==== Using TensorFlow ==== ==== Using TensorFlow ====
-You can now use TensorFlow in your python scripts. Please read [[en:​services:​application_services:​high_performance_computing:​running_jobs_for_experienced_users|Running Jobs (for experienced Users)#​gpu_selection]] for more information about GPU usage.+You can now use TensorFlow in your python scripts. Please read [[en:​services:​application_services:​high_performance_computing:​running_jobs_slurm#​gpu_selection]] for more information about GPU usage.