Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentes Révision précédente Prochaine révision | Révision précédente | ||
| tensorflow [2017/04/14 12:21] – admin | tensorflow [2019/01/29 14:34] (Version actuelle) – admin | ||
|---|---|---|---|
| Ligne 1: | Ligne 1: | ||
| ====== TensorFlow ====== | ====== TensorFlow ====== | ||
| + | <note warning> | ||
| + | TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. | ||
| - | TensorFlow™ is an open source software library for numerical computation using data flow graphs. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them | + | |
| - | FIXME | + | ====== How to use Tensorflow ====== |
| + | |||
| + | TensorFlow **1.x** is available within [[singularity| Singularity container]] | ||
| + | |||
| + | ====== How to install custom python package | ||
| + | Singularity images are read only. But on can install custom python package outside the container. The packages will be installed in the HOME directory. | ||
| + | |||
| + | Say we want to install '' | ||
| + | |||
| + | We use '' | ||
| + | |||
| + | Load singularity | ||
| + | <code bash> | ||
| + | $ export LC_ALL=C | ||
| + | $ module load tools/ | ||
| + | </ | ||
| + | Install | ||
| + | <code bash> | ||
| + | $ singularity exec / | ||
| + | </ | ||
| + | Check installation | ||
| + | <code bash> | ||
| + | $ singularity exec / | ||
| + | Python 2.7.12 (default, Dec 4 2017, 14:50:18) | ||
| + | [GCC 5.4.0 20160609] on linux2 | ||
| + | Type " | ||
| + | >>> | ||
| + | |||
| + | </ | ||
| + | |||
| + | |||
| + | |||
| + | ===== GPU version ===== | ||
| + | |||
| + | We will use **tensorflow-gpu.img** container image. | ||
| + | |||
| + | Here is an example of SGE script that use tensorFlow GPU version withing singularity: | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | #!/bin/bash | ||
| + | |||
| + | #$ -o $JOB_NAME.o$JOB_ID | ||
| + | |||
| + | #$ -N job_tensorflow | ||
| + | |||
| + | #$ -q tesla.q | ||
| + | |||
| + | #$ -l h_vmem=48G | ||
| + | |||
| + | |||
| + | ## load singularity | ||
| + | |||
| + | module load tools/ | ||
| + | |||
| + | ## run TF with singularity | ||
| + | |||
| + | singularity exec --nv $SING_SPOOL/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||
| + | <note warning> | ||
| + | |||
| + | |||
| + | ===== CPU version ===== | ||
| + | |||
| + | CPU version of TensorFlow is less powerful than the GPU version. | ||
| + | |||
| + | We will use Singularity container: **ubuntu-16.img** | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | #!/bin/bash | ||
| + | |||
| + | #$ -o $JOB_NAME.o$JOB_ID | ||
| + | |||
| + | #$ -N job_tensorflowCPU | ||
| + | |||
| + | #$ -q all.q ## we request all.q | ||
| + | |||
| + | #$ -l h_vmem=4G | ||
| + | |||
| + | |||
| + | ## load singularity | ||
| + | |||
| + | module load tools/ | ||
| + | |||
| + | ## run TF within singularity | ||
| + | |||
| + | singularity exec $SING_SPOOL/ | ||
| + | |||
| + | |||
| + | </ | ||
| + | |||