This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
guide:tensorflow [2021/11/08 17:19] kgovender [Updating Tensorflow on GPU nodes] |
guide:tensorflow [2025/04/23 14:19] (current) kevin |
||
|---|---|---|---|
| Line 3: | Line 3: | ||
| If you are making use of Jupyter notebook to write your python scripts then you first need to make sure you export the .py file from Jupyter and then copy it onto the cluster | If you are making use of Jupyter notebook to write your python scripts then you first need to make sure you export the .py file from Jupyter and then copy it onto the cluster | ||
| - | Also ensure job is copied to /mnt/lustre3p/ | + | Also ensure job is copied to '' |
| ===== Running Tensorflow on CPU nodes ===== | ===== Running Tensorflow on CPU nodes ===== | ||
| Line 35: | Line 35: | ||
| As with CPU version you can test your python jobs on an interactive node: | As with CPU version you can test your python jobs on an interactive node: | ||
| - | qsub -I -P YOURPROGRAMME(E.G. CSCI1234) -q gpu_1 -l select=1: | + | qsub -I -P YOURPROGRAMME(E.G. CSCI1234) -q gpu_1 -l select=1: |
| Once on an interactive node (gpuNNNN) you need to load up appropriate modules: | Once on an interactive node (gpuNNNN) you need to load up appropriate modules: | ||
| Line 140: | Line 140: | ||
| ===== Updating Tensorflow on GPU nodes ===== | ===== Updating Tensorflow on GPU nodes ===== | ||
| - | First get on a GPU node: | + | First get onto a GPU node: |
| - | **qsub -I -P YOURPROGRAMME(E.G. CSCI1234) -q gpu_1 -l select=1: | + | |
| To update tensorflow you should use a conda environment | To update tensorflow you should use a conda environment | ||
| module purge | module purge | ||
| - | |||
| module load chpc/ | module load chpc/ | ||
| - | '' | + | Create your environment |
| - | **conda create -n tf-gpu tensorflow-gpu python=3.8** | + | |
| - | + | conda activate tf-gpu | |
| - | **conda activate tf-gpu** | + | |
| The above only needs to be done once thereafter all you will need to do is: | The above only needs to be done once thereafter all you will need to do is: | ||
| + | module purge | ||
| + | module load chpc/ | ||
| + | conda activate tf-gpu | ||
| - | **conda activate tf-gpu** | + | in order to use your updated version of tensorflow |
| - | + | ||
| - | to use the updated version of tensorflow | + | |