compute:pythongpu
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| compute:pythongpu [2024/12/11 15:16] – created bjorns | compute:pythongpu [2024/12/11 15:48] (current) – bjorns | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| Both Tensorflow and Torch have been used on this cluster succesfully.\\ | Both Tensorflow and Torch have been used on this cluster succesfully.\\ | ||
| \\ | \\ | ||
| - | An example setup using Python venv, run these commands\\ | + | An example setup using Python venv, run these commands |
| + | \\ | ||
| '' | '' | ||
| '' | '' | ||
| '' | '' | ||
| - | The new Python virtual environment has been created and activated, torch package installed\\ | + | \\ |
| - | And the correct CUDA library is also installed\\ | + | The new Python virtual environment has been created and activated, |
| + | And the correct | ||
| Please run a simple test with python code to make sure you can communicate with the GPU\\ | Please run a simple test with python code to make sure you can communicate with the GPU\\ | ||
| + | One example command to test torch\\ | ||
| + | '' | ||
| + | \\ | ||
| + | But you must run this code test with **sbatch**, send your job to the cluster\\ | ||
| + | Create a python file dummy.py with the test-GPU command\\ | ||
| + | \\ | ||
| + | Update the sbatch script file, mine is called **oneJob.sh**\\ | ||
| + | Remove lines below last #SBatch\\ | ||
| + | Add 2 lines\\ | ||
| + | '' | ||
| + | '' | ||
| + | [SAVE]\\ | ||
| + | Run the command '' | ||
| + | The response should be **Submitted batch job XXX**\\ | ||
| + | Then check your log file (default name is myJob.log) for the result\\ | ||
| + | \\ | ||
| + | Installing Tensorflow is same process, we recommend using a different virtual environment if you want to try both of them\\ | ||
| + | Make sure to instruct pip in this way, to get all necessary packages '' | ||
| \\ | \\ | ||
| == Those version have also been used before and known to work == | == Those version have also been used before and known to work == | ||
compute/pythongpu.1733930178.txt.gz · Last modified: 2024/12/11 15:16 by bjorns