Work in progress Dockerfile to create a GPU enabled Ray runtime with Nvidia Docker.
Uses the environment variable RAY_CLUSTER
to connect to an existing Ray cluster (given its Redis location).
FROM nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04 | |
# At build time we might require a proxy, depending on our network configuration | |
ARG http_proxy | |
ARG https_proxy | |
ENV http_proxy=$http_proxy | |
ENV https_proxy=$https_proxy | |
ENV HTTP_PROXY=$http_proxy | |
ENV HTTPS_PROXY=$https_proxy | |
ENV DEBIAN_FRONTEND noninteractive | |
ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/local/cuda-10.0/compat/ | |
RUN apt-get update && apt-get install -y --fix-missing \ | |
nano \ | |
wget \ | |
python3.7 \ | |
python3-distutils \ | |
python3-dev | |
RUN wget -O get-pip.py 'https://bootstrap.pypa.io/get-pip.py'; | |
RUN python3.7 get-pip.py \ | |
--disable-pip-version-check \ | |
--no-cache-dir | |
RUN python3.7 -m pip install ray | |
CMD python3.7 -c "import os; import ray; ray.init(redis_address=os.environ.get('RAY_CLUSTER') or None)" |