2018-03-07 12:16:08 -06:00
|
|
|
# The base-deps Docker image installs main libraries needed to run Ray
|
2016-12-31 17:21:33 -08:00
|
|
|
|
2020-10-12 14:22:51 -07:00
|
|
|
# The GPU option is nvidia/cuda:10.1-cudnn8-runtime-ubuntu18.04
|
2020-08-26 19:36:11 -07:00
|
|
|
ARG BASE_IMAGE="ubuntu:focal"
|
|
|
|
FROM ${BASE_IMAGE}
|
2020-09-02 13:03:35 -07:00
|
|
|
# If this arg is not "autoscaler" then no autoscaler requirements will be included
|
|
|
|
ARG AUTOSCALER="autoscaler"
|
2020-08-03 16:37:15 -07:00
|
|
|
ENV TZ=America/Los_Angeles
|
2020-08-26 19:36:11 -07:00
|
|
|
# TODO(ilr) $HOME seems to point to result in "" instead of "/root"
|
|
|
|
ENV PATH "/root/anaconda3/bin:$PATH"
|
2020-08-03 16:37:15 -07:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2020-09-15 16:07:29 -07:00
|
|
|
ARG PYTHON_VERSION=3.7.7
|
2020-07-20 11:16:57 -07:00
|
|
|
RUN apt-get update -y && apt-get upgrade -y \
|
2018-03-07 12:16:08 -06:00
|
|
|
&& apt-get install -y \
|
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
cmake \
|
2020-09-03 09:30:03 -07:00
|
|
|
$(if [ "$AUTOSCALER" = "autoscaler" ]; then echo \
|
2020-07-05 17:31:59 -07:00
|
|
|
tmux \
|
|
|
|
screen \
|
|
|
|
rsync \
|
2020-07-27 15:31:35 -07:00
|
|
|
openssh-client \
|
2020-09-02 13:03:35 -07:00
|
|
|
gnupg; fi) \
|
2018-03-07 12:16:08 -06:00
|
|
|
&& wget \
|
2020-07-27 16:18:12 -07:00
|
|
|
--quiet "https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh" \
|
|
|
|
-O /tmp/miniconda.sh \
|
|
|
|
&& /bin/bash /tmp/miniconda.sh -b -u -p $HOME/anaconda3 \
|
|
|
|
&& $HOME/anaconda3/bin/conda init \
|
|
|
|
&& echo 'export PATH=$HOME/anaconda3/bin:$PATH' > /etc/profile.d/conda.sh \
|
|
|
|
&& rm /tmp/miniconda.sh \
|
|
|
|
&& $HOME/anaconda3/bin/conda install -y \
|
2020-09-15 16:07:29 -07:00
|
|
|
libgcc python=$PYTHON_VERSION \
|
2020-07-27 16:18:12 -07:00
|
|
|
&& $HOME/anaconda3/bin/conda clean -y --all \
|
|
|
|
&& $HOME/anaconda3/bin/pip install --no-cache-dir \
|
2018-04-13 20:33:20 -07:00
|
|
|
flatbuffers \
|
2019-04-02 22:17:33 -07:00
|
|
|
cython==0.29.0 \
|
2020-06-02 02:26:08 +05:30
|
|
|
numpy==1.15.4 \
|
2020-08-26 19:36:11 -07:00
|
|
|
psutil \
|
2020-09-02 13:03:35 -07:00
|
|
|
blist \
|
|
|
|
# blist is needed for numpy (which is re-installed when ray is installed)
|
2020-06-02 02:26:08 +05:30
|
|
|
# To avoid the following error on Jenkins:
|
|
|
|
# AttributeError: 'numpy.ufunc' object has no attribute '__module__'
|
2020-08-26 19:36:11 -07:00
|
|
|
&& $HOME/anaconda3/bin/pip uninstall -y dask \
|
|
|
|
# We install cmake temporarily to get psutil
|
2020-09-02 13:03:35 -07:00
|
|
|
&& apt-get autoremove -y cmake \
|
|
|
|
# Either install kubectl or remove wget
|
2020-09-03 09:30:03 -07:00
|
|
|
&& (if [ "$AUTOSCALER" = "autoscaler" ]; \
|
2020-09-02 13:03:35 -07:00
|
|
|
then wget -O - -q https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
|
|
|
|
&& touch /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& apt-get update \
|
|
|
|
&& apt-get install kubectl; \
|
|
|
|
else apt-get autoremove -y wget; \
|
|
|
|
fi;) \
|
2020-08-26 19:36:11 -07:00
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& apt-get clean
|