2021-10-26 17:32:56 -07:00
|
|
|
ARG BASE_IMAGE
|
|
|
|
FROM rayproject/ray:nightly"$BASE_IMAGE"
|
2021-01-28 15:24:50 -08:00
|
|
|
ARG PYTHON_MINOR_VERSION=7
|
2020-09-02 13:03:35 -07:00
|
|
|
|
|
|
|
# We have to uninstall wrapt this way for Tensorflow compatibility
|
|
|
|
COPY requirements.txt ./
|
2021-09-16 20:16:40 -07:00
|
|
|
COPY requirements_dl.txt ./
|
2020-09-02 13:03:35 -07:00
|
|
|
COPY requirements_ml_docker.txt ./
|
|
|
|
COPY requirements_rllib.txt ./
|
2021-02-11 15:43:09 -08:00
|
|
|
COPY requirements_tune.txt ./requirements_tune.txt
|
2022-03-17 15:07:32 -07:00
|
|
|
COPY requirements_train.txt ./
|
2021-10-26 17:32:56 -07:00
|
|
|
COPY requirements_upstream.txt ./
|
2020-09-02 13:03:35 -07:00
|
|
|
|
2020-11-12 08:41:50 -08:00
|
|
|
RUN sudo apt-get update \
|
|
|
|
&& sudo apt-get install -y gcc \
|
2020-09-02 13:03:35 -07:00
|
|
|
cmake \
|
|
|
|
libgtk2.0-dev \
|
|
|
|
zlib1g-dev \
|
|
|
|
libgl1-mesa-dev \
|
2021-09-03 09:35:18 +01:00
|
|
|
unzip \
|
|
|
|
unrar \
|
2022-03-25 16:59:54 +01:00
|
|
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -U pip \
|
|
|
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -U \
|
|
|
|
-r requirements.txt \
|
|
|
|
-r requirements_rllib.txt \
|
|
|
|
-r requirements_train.txt \
|
|
|
|
-r requirements_tune.txt \
|
|
|
|
-r requirements_upstream.txt \
|
|
|
|
# explicitly install (overwrite) pytorch with CUDA support
|
|
|
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -U \
|
|
|
|
-r requirements_ml_docker.txt \
|
2021-01-28 15:24:50 -08:00
|
|
|
# Remove dataclasses & typing because they are included in Python > 3.6
|
|
|
|
&& if [ $(python -c 'import sys; print(sys.version_info.minor)') != "6" ]; then \
|
|
|
|
$HOME/anaconda3/bin/pip uninstall dataclasses typing -y; fi \
|
2022-03-25 16:59:54 +01:00
|
|
|
&& sudo rm \
|
|
|
|
requirements.txt \
|
|
|
|
requirements_ml_docker.txt \
|
|
|
|
requirements_tune.txt \
|
|
|
|
requirements_rllib.txt \
|
|
|
|
requirements_train.txt \
|
|
|
|
requirements_upstream.txt \
|
2020-11-12 08:41:50 -08:00
|
|
|
&& sudo apt-get clean
|
2021-09-03 09:35:18 +01:00
|
|
|
|
2021-09-15 08:46:37 +02:00
|
|
|
# Make sure tfp is installed correctly and matches tf version.
|
|
|
|
RUN python -c "import tensorflow_probability"
|