software:tensorflow:caviness

This is an old revision of the document!


Tensorflow on Caviness

TensorFlow must be used as a container. You write your Python code either somewhere in your home directory ($HOME) or in the workgroup directory ($WORKDIR). You should speak to other group members to understand how you should make use of the workgroup directory, e.g. create a directory for yourself, etc.

Remember you must specify your workgroup to define your cluster group or investing-entity compute nodes before submitting any job, and this includes starting an interactive session or submitting a batch job.

$ workgroup -g «investing-entity»

Assuming you created your personal workgroup storage area as $WORKDIR/$USER, create a directory therein for your first TensorFlow job:

$ mkdir -p ${WORKDIR}/${USER}/tf-test-001
$ cd ${WORKDIR}/${USER}/tf-test-001

For example, say your TensorFlow Python script is called tf-script.py, then you should copy this file or create it the tf-test-001 directory, then copy the tensorflow.qs job script template:

$ cp /opt/shared/tensorflow/tensorflow.qs .

You will need to modify the copy of tensorflow.qs accordingly (–cpus-per-task=2 to however many CPU cores you need, 1 - 36; –mem-per-cpu=1024M to alter max memory limit; –job-name=tensorflow, etc.). The template has extensive documentation that should assist you in customizing it for the job. Last but not least, the last line should be changed to match your Python script name and for this example, it it would be tf-script.py:

#
# Execute our TensorFlow Python script:
#
python tf-script.py

Finally, submit the job using the "sbatch" command:

$ sbatch tensorflow.qs
  • software/tensorflow/caviness.1561571157.txt.gz
  • Last modified: 2019-06-26 13:45
  • by anita