Ray with Docker (#324)

* Ray with Docker

* cleanup based on comments

* rename docker user to ray-user

* add examples docker image

* working toward reliable Docker devel image

* adjust ray-user uid for Linux builds on AWS

* update documentation

* reduced dependencies for examples

* updated Docker documentation

* experimental notice on developing with Docker
This commit is contained in:
Johann Schleier-Smith
2016-08-01 16:44:11 -07:00
committed by Robert Nishihara
parent 97b923a750
commit 79e4a5a00e
6 changed files with 155 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
FROM ubuntu:xenial
RUN apt-get update
RUN apt-get -y install apt-utils
RUN apt-get -y install sudo
RUN apt-get install -y git cmake build-essential autoconf curl libtool python-dev python-numpy python-pip libboost-all-dev unzip graphviz
RUN pip install ipython typing funcsigs subprocess32 protobuf==3.0.0a2 colorama graphviz cloudpickle
RUN adduser --gecos --ingroup ray-user --disabled-login --gecos ray-user
RUN adduser ray-user sudo
RUN sed -i "s|%sudo\tALL=(ALL:ALL) ALL|%sudo\tALL=NOPASSWD: ALL|" /etc/sudoers
USER ray-user
WORKDIR /home/ray-user
RUN git clone https://github.com/amplab/ray
WORKDIR /home/ray-user/ray
RUN ./setup.sh
RUN ./build.sh
RUN echo '\n# Ray environment\nsource /home/ray-user/ray/setup-env.sh' >> /home/ray-user/.bashrc
ENTRYPOINT bash
+15
View File
@@ -0,0 +1,15 @@
FROM ubuntu:xenial
RUN apt-get update
RUN apt-get -y install apt-utils
RUN apt-get -y install sudo
RUN apt-get install -y git cmake build-essential autoconf curl libtool python-dev python-numpy python-pip libboost-all-dev unzip graphviz
RUN pip install ipython typing funcsigs subprocess32 protobuf==3.0.0a2 colorama graphviz cloudpickle
RUN adduser --gecos --ingroup ray-user --disabled-login --gecos ray-user --uid 500
RUN adduser ray-user sudo
RUN sed -i "s|%sudo\tALL=(ALL:ALL) ALL|%sudo\tALL=NOPASSWD: ALL|" /etc/sudoers
USER ray-user
WORKDIR /home/ray-user
RUN mkdir /home/ray-user/ray-build
RUN mkdir /home/ray-user/ray
RUN ln -s /home/ray-user/ray-build /home/ray-user/ray/build
ENTRYPOINT bash
+11
View File
@@ -0,0 +1,11 @@
FROM amplab/ray:deploy
# Tensorflow
RUN pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.0-cp27-none-linux_x86_64.whl
# SciPy
RUN pip install scipy
# Gym
RUN sudo apt-get -y install zlib1g-dev libjpeg-dev xvfb libav-tools xorg-dev python-opengl libsdl2-dev swig wget
RUN pip install gym[atari]