-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtf-gpu-1.11.0.def
26 lines (22 loc) · 1.05 KB
/
tf-gpu-1.11.0.def
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Bootstrap: docker
From: tensorflow/tensorflow:1.11.0-gpu-py3
%environment
# avoid warning about inability to change locale
LC_ALL="C"
export LC_ALL
%post
mkdir -p /global/home/users
mkdir -p /global/scratch
# /bin/nvidia-smi is a binary on the GPU nodes. Singularity with --nv seems to mount /bin/nvidia-smi and fails unless the file already exists in the container.
touch /bin/nvidia-smi
# avoid warnings about non existent bind points
touch /usr/bin/nvidia-smi
touch /usr/bin/nvidia-debugdump
touch /usr/bin/nvidia-persistenced
touch /usr/bin/nvidia-cuda-mps-control
touch /usr/bin/nvidia-cuda-mps-server
%runscript
python "$@"
%startscript
# Not working because can't figure out how to write to a directory accessible to user and instance.start seems to execute without reference to the user
# if [ "${SLURM_JOB_ID}" != "" ]; then jupyter notebook --no-browser --ip=${SLURMD_NODENAME} 2>> slurm-${SLURM_JOB_ID}.out; else env && jupyter notebook --no-browser --ip="localhost" 2> jupyter-tf-gpu.out; fi