Fixed outdated TensorFlow-with-Spyder example

documentation_update
Thomas Arildsen 2 years ago
parent e3bee41dd0
commit 8d2e9d02c7
  1. 18
      aicloud_slurm/README.md
  2. 4
      aicloud_slurm/tensorflow_spyder/Singularity

@ -23,7 +23,7 @@
- [PyTorch and Anaconda](#pytorch-and-anaconda)
- [PyTorch and multi-precision training](#pytorch-and-multi-precision-training)
- [Multi-GPU data parallelism training with Horovod and Keras](#multi-gpu-data-parallelism-training-with-horovod-and-keras)
- [TensorFlow with Spyder 3 GUI](#tensorflow-with-spyder3-gui)
- [TensorFlow 2 with Spyder GUI](#tensorflow-2-with-spyder-gui)
- [Matlab](#matlab)
- [Priority](#priority)
- [Fair usage](#fair-usage)
@ -616,19 +616,19 @@ An example on how to adapt your PyTorch code is provided [here](https://git.its.
The NVIDIA DGX-2 comes with specialized hardware for moving data between GPUs: [NVLinks and NVSwitches](https://www.nvidia.com/en-us/data-center/nvlink/). One approach to utilizing these links is using the MVDIA Collective Communication Library ([NCCL](https://developer.nvidia.com/NCCL)). NCCL is compatible with the Message Passing Library (MPI) used in many HPC applications and facilities. This in turn is build into the Horovod framework for data parallelism training supporting many deep learning frameworks requiring only minor changes in the source code. In [this example](https://git.its.aau.dk/CLAAUDIA/docs_aicloud/src/branch/master/aicloud_slurm/multi_gpu_keras) we show how to run Horovod on our system, including Slurm settings. You can then adapt this example for you preferred framework as described in the [Horovod documentation](https://horovod.readthedocs.io/en/stable/)
## Tensorflow with spyder3 GUI
## TensorFlow 2 with Spyder GUI
It is possible to start a GUI in the singularity container and show graphical elements. In this example we will start the IDE Spyder 3 using X11 forwarding. First connect to the AI Cloud with X11 forwarding enabled
It is possible to start a GUI in the Singularity container and show graphical elements. In this example we will start the IDE Spyder using X11 forwarding. First connect to the AI Cloud with X11 forwarding enabled
```console
ssh <aau ID>@ai-pilot.srv.aau.dk -X
```
From the above git repository, go to the folder 'aicloud_slurm/tensorflow_spyder/' with the Singularity file containing
From the Git repository hosting this documentation, go to the folder 'aicloud_slurm/tensorflow_spyder/' with the Singularity file containing:
```console
BootStrap: docker
From: nvcr.io/nvidia/tensorflow:19.11-tf1-py3
From: nvcr.io/nvidia/tensorflow:21.06-tf2-py3
%post
apt-get update
@ -637,18 +637,18 @@ pip install pandas
pip install spyder
```
Build the image with
Build the image by running:
```console
srun --cpus-per-task=6 singularity build --fakeroot tensorflow_spyder.sif Singularity
```
Execute with (notice the --x11 flag to enable X11 forwarding via the SLURM scheduler)
Execute with (notice the `--x11` flag to enable X11 forwarding via the Slurm scheduler)
```console
srun --gres=gpu:1 --x11 singularity exec tensorflow_spyder.sif spyder3
srun --gres=gpu:1 --x11 singularity exec --nv tensorflow_spyder.sif spyder
```
You should now see the Spyder 3 GUI.
You should now see the Spyder GUI (it may take a few seconds to appear depending on your connection bandwidth).
## Matlab
It is possible to run Matlab both with and without GUI

@ -1,8 +1,8 @@
BootStrap: docker
From: nvcr.io/nvidia/tensorflow:19.11-tf1-py3
From: nvcr.io/nvidia/tensorflow:21.06-tf2-py3
%post
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get -yq install xorg x11-apps libxkbcommon-x11-0 alsa
pip install pandas
pip install spyder
pip install spyder

Loading…
Cancel
Save