[docker] Build docker in Travis PR & Fix image build failing (#9787)

Co-authored-by: Ian Rodney <ian.rodney@gmail.com>
This commit is contained in:
Simon Mo
2020-08-03 16:37:15 -07:00
committed by GitHub
co-authored by Ian Rodney
parent edcd94f26b
commit c218f2eff6
9 changed files with 101 additions and 66 deletions
+6 -12
View File
@@ -1,6 +1,4 @@
FROM rayproject/base-deps
ARG WHEEL_PATH
ARG WHEEL_NAME
FROM rayproject/ray
# Install kubectl.
RUN apt-get update \
@@ -13,14 +11,10 @@ RUN apt-get update \
&& apt-get clean
# We have to uninstall wrapt this way for Tensorflow compatibility
COPY ../../python/requirements.txt ./
COPY ../../python/requirements_autoscaler.txt ./
COPY $WHEEL_PATH $WHEEL_NAME
COPY requirements.txt ./
COPY requirements_autoscaler.txt ./
RUN pip --no-cache-dir install -r requirements.txt \
&& pip --no-cache-dir install -r requirements_autoscaler.txt \
&& pip --no-cache-dir install $WHEEL_NAME[all]
RUN $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements.txt \
&& $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements_autoscaler.txt \
&& rm requirements.txt && rm requirements_autoscaler.txt
# For Click
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
+5 -4
View File
@@ -1,6 +1,8 @@
# The base-deps Docker image installs main libraries needed to run Ray
FROM ubuntu:focal
ENV TZ=America/Los_Angeles
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y && apt-get upgrade -y \
&& apt-get install -y \
git \
@@ -9,13 +11,11 @@ RUN apt-get update -y && apt-get upgrade -y \
build-essential \
curl \
unzip \
libgtk2.0-dev \
zlib1g-dev \
libgl1-mesa-dev \
tmux \
screen \
rsync \
openssh-client \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean \
&& wget \
--quiet "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" \
@@ -35,4 +35,5 @@ RUN apt-get update -y && apt-get upgrade -y \
# AttributeError: 'numpy.ufunc' object has no attribute '__module__'
&& $HOME/anaconda3/bin/pip uninstall -y dask
ENV PATH "$HOME/anaconda3/bin:$PATH"
# TODO(ilr) $HOME seems to point to result in "" instead of "/root"
ENV PATH "/root/anaconda3/bin:$PATH"
+1 -1
View File
@@ -5,7 +5,7 @@ FROM ray-project/deploy
# This updates numpy to 1.14 and mutes errors from other libraries
RUN conda install -y numpy
# Needed to run Tune example with a 'plot' call - which does not actually render a plot, but throws an error.
RUN apt-get install -y zlib1g-dev libgl1-mesa-dev
RUN apt-get install -y zlib1g-dev libgl1-mesa-dev libgtk2.0-dev
RUN pip install -U pip
RUN pip install gym[atari] opencv-python-headless tensorflow lz4 pytest-timeout smart_open tensorflow_probability dm_tree
RUN pip install -U h5py # Mutes FutureWarnings
+7
View File
@@ -0,0 +1,7 @@
FROM rayproject/base-deps
ARG WHEEL_PATH
# For Click
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
COPY $WHEEL_PATH .
RUN $HOME/anaconda3/bin/pip --no-cache-dir install `basename $WHEEL_PATH`[all]