Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hpc-compendium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIH
hpcsupport
hpc-compendium
Commits
672ce5b2
Commit
672ce5b2
authored
3 years ago
by
Elias Werner
Browse files
Options
Downloads
Patches
Plain Diff
changes after PR
parent
2fc2518c
No related branches found
No related tags found
6 merge requests
!333
Draft: update NGC containers
,
!322
Merge preview into main
,
!319
Merge preview into main
,
!279
Draft: Machine Learning restructuring
,
!268
Update ML branch with the content from DA
,
!258
Data Analytics restructuring
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc.zih.tu-dresden.de/docs/software/tensorflow.md
+24
-24
24 additions, 24 deletions
doc.zih.tu-dresden.de/docs/software/tensorflow.md
with
24 additions
and
24 deletions
doc.zih.tu-dresden.de/docs/software/tensorflow.md
+
24
−
24
View file @
672ce5b2
...
...
@@ -22,38 +22,38 @@ and the TensorFlow library. You can find detailed hardware specification
On the
**Alpha**
partition load the module environment:
```
Bash
taurus
login
:~>
srun -p alpha --gres=gpu:1 -n 1 -c 7 --pty --mem-per-cpu=8000 bash #Job submission on alpha nodes with 1 gpu on 1 node with 8000 mb.
taurus-
rome
:~>
module load modenv/scs5
```
console
marie@
login
$
srun
-p
alpha
--gres
=
gpu:1
-n
1
-c
7
--pty
--mem-per-cpu
=
8000 bash
#Job submission on alpha nodes with 1 gpu on 1 node with 8000 mb.
marie@
rome
o$
module load modenv/scs5
```
On the
**ML**
partition load the module environment:
```
Bash
taurus
login
:~>
srun -p ml --gres=gpu:1 -n 1 -c 7 --pty --mem-per-cpu=8000 bash #Job submission in ml nodes with 1 gpu on 1 node with 8000 mb.
taurus-ml:~>
module load modenv/ml #example output: The following have been reloaded with a version change: 1) modenv/scs5 => modenv/ml
```
console
marie@
login
$
srun
-p
ml
--gres
=
gpu:1
-n
1
-c
7
--pty
--mem-per-cpu
=
8000 bash
#Job submission in ml nodes with 1 gpu on 1 node with 8000 mb.
marie@ml$
module load modenv/ml
#example output: The following have been reloaded with a version change: 1) modenv/scs5 => modenv/ml
```
This example shows how to install and start working with TensorFlow (with using modules system)
```
Bash
taurus-ml:~>
module load TensorFlow #load TensorFlow module. example output: Module TensorFlow/1.10.0-PythonAnaconda-3.6 and 1 dependency loaded.
```
console
marie@ml$
module load TensorFlow
#load TensorFlow module. example output: Module TensorFlow/1.10.0-PythonAnaconda-3.6 and 1 dependency loaded.
```
Now we check that we can access TensorFlow. One example is tensorflow-test:
```
Bash
taurus-ml:~>
tensorflow-test #example output: Basic test of tensorflow - A Hello World!!!...
```
console
marie@ml$
tensorflow-test
#example output: Basic test of tensorflow - A Hello World!!!...
```
As another example we use a python virtual environment and import TensorFlow.
```
Bash
taurus-ml:~>
mkdir python-environments #create folder
taurus-ml:~>
which python #check which python are you using
taurus-ml:~>
virtualenvv --system-site-packages python-environments/env #create virtual environment "env" which inheriting with global site packages
taurus-ml:~>
source python-environments/env/bin/activate #activate virtual environment "env". Example output: (env) bash-4.2$
taurus-ml:~>
python #start python
```
console
marie@ml$
mkdir
python-environments
#create folder
marie@ml$
which python
#check which python are you using
marie@ml$
virtualenvv
--system-site-packages
python-environments/env
#create virtual environment "env" which inheriting with global site packages
marie@ml$
source
python-environments/env/bin/activate
#activate virtual environment "env". Example output: (env) bash-4.2$
marie@ml$
python
#start python
>
>>
import tensorflow as tf
>
>>
print
(
tf.VERSION
)
#example output: 1.10.0
```
...
...
@@ -73,13 +73,13 @@ Another option to use TensorFlow are containers. In the HPC domain, the
[
Singularity
](
https://singularity.hpcng.org/
)
container system is a widely used tool. In the
following example, we use the tensorflow-test in a Singularity container:
```
Bash
taurus
login
:~>
srun -p ml --gres=gpu:1 -n 1 -c 7 --pty --mem-per-cpu=8000 bash #Job submission in ml nodes with 1 gpu on 1 node with 8000 mb.
taurus-ml:~>
singularity shell --nv /scratch/singularity/powerai-1.5.3-all-ubuntu16.04-py3.img
taurus-ml:~>
export PATH=/opt/anaconda3/bin:$PATH
taurus-ml:~>
source activate /opt/anaconda3 #activate conda environment
taurus-ml:~>
. /opt/DL/tensorflow/bin/tensorflow-activate
taurus-ml:~>
tensorflow-test #example output: Basic test of tensorflow - A Hello World!!!...
```
console
marie@
login
$
srun
-p
ml
--gres
=
gpu:1
-n
1
-c
7
--pty
--mem-per-cpu
=
8000 bash
#Job submission in ml nodes with 1 gpu on 1 node with 8000 mb.
marie@ml$
singularity shell
--nv
/scratch/singularity/powerai-1.5.3-all-ubuntu16.04-py3.img
marie@ml$
export
PATH
=
/opt/anaconda3/bin:
$PATH
marie@ml$
source
activate /opt/anaconda3
#activate conda environment
marie@ml$
.
/opt/DL/tensorflow/bin/tensorflow-activate
marie@ml$
tensorflow-test
#example output: Basic test of tensorflow - A Hello World!!!...
```
## TensorFlow with Python or R
...
...
@@ -117,6 +117,6 @@ Note: For optimal NCCL performance it is recommended to set the
**NCCL_MIN_NRINGS**
environment variable during execution. You can try
different values but 4 should be a pretty good starting point.
```
Bash
```
console
export NCCL_MIN_NRINGS=4
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment