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
|
|
|
|
2021-10-26 17:32:56 -07:00
|
|
|
# The GPU options are NVIDIA CUDA developer images.
|
2020-08-26 19:36:11 -07:00
|
|
|
ARG BASE_IMAGE="ubuntu:focal"
|
|
|
|
FROM ${BASE_IMAGE}
|
2021-04-29 13:45:55 -07:00
|
|
|
# FROM directive resets ARG
|
|
|
|
ARG 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-11-25 13:30:10 -05:00
|
|
|
# TODO(ilr) $HOME seems to point to result in "" instead of "/home/ray"
|
|
|
|
ENV PATH "/home/ray/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-11-12 08:41:50 -08:00
|
|
|
|
|
|
|
ARG RAY_UID=1000
|
|
|
|
ARG RAY_GID=100
|
|
|
|
|
|
|
|
RUN apt-get update -y \
|
|
|
|
&& apt-get install -y sudo tzdata \
|
|
|
|
&& useradd -ms /bin/bash -d /home/ray ray --uid $RAY_UID --gid $RAY_GID \
|
|
|
|
&& usermod -aG sudo ray \
|
|
|
|
&& echo 'ray ALL=NOPASSWD: ALL' >> /etc/sudoers \
|
|
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
USER $RAY_UID
|
|
|
|
ENV HOME=/home/ray
|
|
|
|
|
|
|
|
RUN sudo apt-get update -y && sudo apt-get upgrade -y \
|
|
|
|
&& sudo apt-get install -y \
|
2018-03-07 12:16:08 -06:00
|
|
|
git \
|
|
|
|
wget \
|
|
|
|
cmake \
|
2021-01-28 15:24:50 -08:00
|
|
|
g++ \
|
|
|
|
zlib1g-dev \
|
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 \
|
2020-11-12 08:41:50 -08:00
|
|
|
&& echo 'export PATH=$HOME/anaconda3/bin:$PATH' >> /home/ray/.bashrc \
|
2020-07-27 16:18:12 -07:00
|
|
|
&& 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 \
|
2021-12-26 23:26:08 -05:00
|
|
|
cython==0.29.26 \
|
2021-11-15 14:10:00 -08:00
|
|
|
# Necessary for Dataset to work properly.
|
2021-11-17 07:15:18 -08:00
|
|
|
numpy\>=1.20 \
|
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 \
|
[RLlib] Upgrade gym version to 0.21 and deprecate pendulum-v0. (#19535)
* Fix QMix, SAC, and MADDPA too.
* Unpin gym and deprecate pendulum v0
Many tests in rllib depended on pendulum v0,
however in gym 0.21, pendulum v0 was deprecated
in favor of pendulum v1. This may change reward
thresholds, so will have to potentially rerun
all of the pendulum v1 benchmarks, or use another
environment in favor. The same applies to frozen
lake v0 and frozen lake v1
Lastly, all of the RLlib tests and have
been moved to python 3.7
* Add gym installation based on python version.
Pin python<= 3.6 to gym 0.19 due to install
issues with atari roms in gym 0.20
* Reformatting
* Fixing tests
* Move atari-py install conditional to req.txt
* migrate to new ale install method
* Fix QMix, SAC, and MADDPA too.
* Unpin gym and deprecate pendulum v0
Many tests in rllib depended on pendulum v0,
however in gym 0.21, pendulum v0 was deprecated
in favor of pendulum v1. This may change reward
thresholds, so will have to potentially rerun
all of the pendulum v1 benchmarks, or use another
environment in favor. The same applies to frozen
lake v0 and frozen lake v1
Lastly, all of the RLlib tests and have
been moved to python 3.7
* Add gym installation based on python version.
Pin python<= 3.6 to gym 0.19 due to install
issues with atari roms in gym 0.20
Move atari-py install conditional to req.txt
migrate to new ale install method
Make parametric_actions_cartpole return float32 actions/obs
Adding type conversions if obs/actions don't match space
Add utils to make elements match gym space dtypes
Co-authored-by: Jun Gong <jungong@anyscale.com>
Co-authored-by: sven1977 <svenmika1977@gmail.com>
2021-11-03 08:24:00 -07:00
|
|
|
# We install cmake temporarily to get psutil, blist
|
2021-04-29 13:45:55 -07:00
|
|
|
&& sudo apt-get autoremove -y cmake zlib1g-dev \
|
|
|
|
# We keep g++ on GPU images, because uninstalling removes CUDA Devel tooling
|
|
|
|
$(if [ "$BASE_IMAGE" = "ubuntu:focal" ]; then echo \
|
|
|
|
g++; fi) \
|
2020-09-02 13:03:35 -07:00
|
|
|
# Either install kubectl or remove wget
|
2020-09-03 09:30:03 -07:00
|
|
|
&& (if [ "$AUTOSCALER" = "autoscaler" ]; \
|
2020-11-12 08:41:50 -08:00
|
|
|
then wget -O - -q https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - \
|
|
|
|
&& sudo touch /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list \
|
|
|
|
&& sudo apt-get update \
|
|
|
|
&& sudo apt-get install kubectl; \
|
|
|
|
else sudo apt-get autoremove -y wget; \
|
2020-09-02 13:03:35 -07:00
|
|
|
fi;) \
|
2020-11-12 08:41:50 -08:00
|
|
|
&& sudo rm -rf /var/lib/apt/lists/* \
|
|
|
|
&& sudo apt-get clean
|
2021-01-27 13:46:07 -08:00
|
|
|
|
2021-04-28 17:20:58 -07:00
|
|
|
WORKDIR $HOME
|