Dockerfile 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ARG GPU
  2. FROM rayproject/ray:nightly"$GPU"
  3. ARG PYTHON_MINOR_VERSION=7
  4. # We have to uninstall wrapt this way for Tensorflow compatibility
  5. COPY requirements.txt ./
  6. COPY requirements_dl.txt ./
  7. COPY requirements_ml_docker.txt ./
  8. COPY requirements_rllib.txt ./
  9. COPY requirements_tune.txt ./requirements_tune.txt
  10. COPY install_atari_roms.sh ./install_atari_roms.sh
  11. RUN sudo apt-get update \
  12. && sudo apt-get install -y gcc \
  13. cmake \
  14. libgtk2.0-dev \
  15. zlib1g-dev \
  16. libgl1-mesa-dev \
  17. unzip \
  18. unrar \
  19. && $HOME/anaconda3/bin/pip install -U pip \
  20. && $HOME/anaconda3/bin/pip --use-deprecated=legacy-resolver --no-cache-dir install -r requirements.txt \
  21. && $HOME/anaconda3/bin/pip --no-cache-dir install -U -r requirements_rllib.txt \
  22. && $HOME/anaconda3/bin/pip --no-cache-dir install -U -r requirements_tune.txt \
  23. && $HOME/anaconda3/bin/pip --no-cache-dir install -U -r requirements_ml_docker.txt \
  24. # Remove dataclasses & typing because they are included in Python > 3.6
  25. && if [ $(python -c 'import sys; print(sys.version_info.minor)') != "6" ]; then \
  26. $HOME/anaconda3/bin/pip uninstall dataclasses typing -y; fi \
  27. && sudo rm requirements.txt && sudo rm requirements_ml_docker.txt \
  28. && sudo rm requirements_tune.txt && sudo rm requirements_rllib.txt \
  29. && sudo apt-get clean
  30. # Make sure tfp is installed correctly and matches tf version.
  31. RUN python -c "import tensorflow_probability"
  32. # Install Atari ROMs. Previously these have been shipped with atari_py \
  33. RUN ./install_atari_roms.sh