Excerpt |
---|
PyTorch is an optimised tensor library for deep learning using GPUs and CPUs. |
...
$ docker pull quay.io/pawsey/pytorch:2.2.0-rocm5.7.3
The container can be also pulled using singularity:
...
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Terminal 1. Checking what version of PyTorch is available on Setonix. |
---|
| $ module avail pytorch
-------------- /software/setonix/2023.08/containers/views/modules --------------
pytorch/2.2.0-rocm5.7.3 |
|
SHPC generates a module (listed above) providing convenient aliases for key programs within the container. This means you can run the container's python3
executable without explicitly loading and executing Singularity command. Singularity module is indeed loaded as a dependency when the PyTorch module is loaded, and all the SIngularity commands are taken care of via wrappers. Here is a very simple example.
Column |
---|
|
Code Block |
---|
language | bash |
---|
theme | DJango |
---|
title | Terminal 1. Invoking python3 interpreter within the PyTorch container. |
---|
| $ module load pytorch/2.2.0-rocm5.7.3
$ python3
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.__version__
'2.2.0a0+git8ac9b20' |
|
Writing PyTorch code for AMD GPUs
...