|
| 1 | +FROM nvcr.io/nvidia/tensorflow:20.02-tf2-py3 |
| 2 | +# NVIDIA DIGITS runs on Python 3.6 |
| 3 | + |
| 4 | +RUN apt-get update && \ |
| 5 | + apt-get install -y libsm6 libxext6 libxrender-dev |
| 6 | + |
| 7 | +ENV PYTHONUNBUFFERED=1 \ |
| 8 | + PATH=/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH \ |
| 9 | + LANG=C.UTF-8 |
| 10 | + |
| 11 | +RUN /usr/bin/python3 -m pip install -U pip setuptools && \ |
| 12 | + /usr/bin/python3 -m pip install --no-cache-dir keras && \ |
| 13 | + /usr/bin/python3 -m pip install --no-cache-dir keras_applications && \ |
| 14 | + /usr/bin/python3 -m pip install --no-cache-dir keras_preprocessing && \ |
| 15 | + /usr/bin/python3 -m pip install --no-cache-dir ipython && \ |
| 16 | + /usr/bin/python3 -m pip install --no-cache-dir pillow && \ |
| 17 | + /usr/bin/python3 -m pip install --no-cache-dir h5py && \ |
| 18 | + /usr/bin/python3 -m pip install --no-cache-dir mpi4py && \ |
| 19 | + /usr/bin/python3 -m pip install --no-cache-dir jupyter && \ |
| 20 | + /usr/bin/python3 -m pip install --no-cache-dir jupyterlab && \ |
| 21 | + /usr/bin/python3 -m pip install --no-cache-dir jupyter-tensorboard |
| 22 | + |
| 23 | +# Install ipython kernelspec |
| 24 | +RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.02 / TensorFlow 2.1.0) on Backend.AI" && \ |
| 25 | + cat /usr/local/share/jupyter/kernels/python3/kernel.json |
| 26 | + |
| 27 | +# Backend.AI specifics |
| 28 | +COPY policy.yml /etc/backend.ai/jail/policy.yml |
| 29 | +LABEL ai.backend.kernelspec="1" \ |
| 30 | + ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \ |
| 31 | + ai.backend.features="batch uid-match" \ |
| 32 | + ai.backend.accelerators="cuda" \ |
| 33 | + ai.backend.resource.min.cpu="1" \ |
| 34 | + ai.backend.resource.min.mem="1g" \ |
| 35 | + ai.backend.resource.min.cuda.device=1 \ |
| 36 | + ai.backend.resource.min.cuda.shares=0.1 \ |
| 37 | + ai.backend.base-distro="ubuntu16.04" \ |
| 38 | + ai.backend.runtime-type="python" \ |
| 39 | + ai.backend.runtime-path="/usr/bin/python" \ |
| 40 | + ai.backend.service-ports="ipython:pty:3000,tensorboard:http:6006,jupyter:http:8080,jupyterlab:http:8090" |
| 41 | + |
| 42 | +# vim: ft=dockerfile |
0 commit comments