Skip to content
This repository was archived by the owner on Mar 29, 2022. It is now read-only.

Commit 140b4fd

Browse files
authored
Update 05.container_gpu.md
1 parent 3386b67 commit 140b4fd

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

docs/05.container_gpu.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,23 +113,42 @@ Please note that the `--nv` flag specifically passes the GPU drivers into the co
113113
singularity exec caffe-latest.img caffe device_query -gpu 0
114114
```
115115

116-
For TensorFlow, you can directly pull their latest GPU image and utilize it as follows.
116+
For TensorFlow, you can no longer directly use the images directly from their Docker repository since they now build them against cuda 9. I have created the [tacc-maverick-ml](https://hub.docker.com/r/gzynda/tacc-maverick-ml/), which includes
117+
118+
- tensorflow v1.6.1
119+
- keras
120+
- pytorch
121+
- anaconda python 3
122+
123+
for this purpose.
117124

118125
```
119126
# Change to your $WORK directory
120127
cd $WORK
121128
#Get the software
122129
git clone https://github.com/tensorflow/models.git ~/models
123130
# Pull the image
124-
singularity pull docker://tensorflow/tensorflow:latest-gpu
131+
singularity pull docker://gzynda/tacc-maverick-ml:latest
125132
# Run the code
126-
singularity exec --nv tensorflow-latest-gpu.img python $HOME/models/tutorials/image/mnist/convolutional.py
133+
singularity exec --nv tacc-maverick-ml-latest.img python $HOME/models/tutorials/image/mnist/convolutional.py
127134
```
128135

129136
You probably noticed that we check out the models repository into your `$HOME` directory. This is because your `$HOME` and `$WORK` directories are only available inside the container if the root folders `/home` and `/work` exist inside the container. In the case of `tensorflow-latest-gpu.img`, the `/work` directory does _not_ exist, so any files there are inaccessible to the container.
130137

131138
You may be thinking "what about overlayfs??". The Linux kernel on Maverick does not support overlayfs, so it had to be disabled in our singularity install.
132139

140+
<br>
141+
#### Prototyping
142+
143+
You can also prototype your application from inside your container with the `shell` command.
144+
145+
```
146+
singularity shell tacc-maverick-ml-latest.img
147+
python --version
148+
exit
149+
python --version
150+
```
151+
133152
<br>
134153
#### Build your APP
135154

0 commit comments

Comments
 (0)