chore: import upstream snapshot with attribution
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# syntax=docker/dockerfile:1.3-labs
|
||||
|
||||
ARG BASE_IMAGE
|
||||
ARG FULL_BASE_IMAGE=rayproject/ray:nightly"$BASE_IMAGE"
|
||||
FROM "$FULL_BASE_IMAGE"
|
||||
|
||||
COPY python/*requirements.txt \
|
||||
python/requirements/ml/*requirements.txt \
|
||||
python/requirements/docker/*requirements.txt ./
|
||||
COPY docker/ray-ml/install-ml-docker-requirements.sh ./
|
||||
|
||||
RUN sudo chmod +x install-ml-docker-requirements.sh \
|
||||
&& ./install-ml-docker-requirements.sh
|
||||
|
||||
# Export installed packages
|
||||
RUN $HOME/anaconda3/bin/pip freeze > /home/ray/pip-freeze.txt
|
||||
|
||||
# Make sure tfp is installed correctly and matches tf version.
|
||||
RUN python -c "import tensorflow_probability"
|
||||
@@ -0,0 +1,34 @@
|
||||
## About
|
||||
This image is an extension of the [`rayproject/ray`](https://hub.docker.com/repository/docker/rayproject/ray) image. It includes all extended requirements of `RLlib`, `Serve` and `Tune`. It is a well-provisioned starting point for trying out the Ray ecosystem. [Find the Dockerfile here.](https://github.com/ray-project/ray/blob/master/docker/ray-ml/Dockerfile)
|
||||
|
||||
## Tags
|
||||
|
||||
Images are `tagged` with the format `{Ray version}[-{Python version}][-{Platform}]`. `Ray version` tag can be one of the following:
|
||||
|
||||
| Ray version tag | Description |
|
||||
| --------------- | ----------- |
|
||||
| `latest` | The most recent Ray release. |
|
||||
| `x.y.z` | A specific Ray release, e.g. 2.9.3 |
|
||||
| `nightly` | The most recent Ray development build (a recent commit from GitHub `master`) |
|
||||
|
||||
The optional `Python version` tag specifies the Python version in the image. All Python versions supported by Ray are available, e.g. `py39`, `py310` and `py311`. If unspecified, the tag points to an image using `Python 3.9`.
|
||||
|
||||
The optional `Platform` tag specifies the platform where the image is intended for:
|
||||
|
||||
| Platform tag | Description |
|
||||
| --------------- | ----------- |
|
||||
| `-cpu` | These are based off of an Ubuntu image. |
|
||||
| `-cuXX` | These are based off of an NVIDIA CUDA image with the specified CUDA version `xx`. They require the NVIDIA Docker Runtime. |
|
||||
| `-gpu` | Aliases to a specific `-cuXX` tagged image. |
|
||||
| no tag | Aliases to `-cpu` tagged images for `ray`, and aliases to ``-gpu`` tagged images for `ray-ml`. |
|
||||
|
||||
Examples tags:
|
||||
- none: equivalent to `latest`
|
||||
- `latest`: equivalent to `latest-py39-gpu`, i.e. image for the most recent Ray release
|
||||
- `nightly-py39-cpu`
|
||||
- `806c18-py39-cu112`
|
||||
|
||||
The `ray-ml` images are not built for the `arm64` (`aarch64`) architecture.
|
||||
|
||||
## Other Images
|
||||
* [`rayproject/ray`](https://hub.docker.com/repository/docker/rayproject/ray) - Ray and all of its dependencies.
|
||||
@@ -0,0 +1,21 @@
|
||||
name: "ray-ml-py$PYTHON_VERSION-cpu-base"
|
||||
froms: ["cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base"]
|
||||
dockerfile: docker/ray-ml/Dockerfile
|
||||
srcs:
|
||||
- python/requirements.txt
|
||||
- python/requirements/ml/dl-cpu-requirements.txt
|
||||
- python/requirements/ml/dl-gpu-requirements.txt
|
||||
- python/requirements/ml/core-requirements.txt
|
||||
- python/requirements/ml/data-requirements.txt
|
||||
- python/requirements/ml/rllib-requirements.txt
|
||||
- python/requirements/ml/rllib-test-requirements.txt
|
||||
- python/requirements/ml/train-requirements.txt
|
||||
- python/requirements/ml/train-test-requirements.txt
|
||||
- python/requirements/ml/tune-requirements.txt
|
||||
- python/requirements/ml/tune-test-requirements.txt
|
||||
- python/requirements/docker/ray-docker-requirements.txt
|
||||
- docker/ray-ml/install-ml-docker-requirements.sh
|
||||
build_args:
|
||||
- FULL_BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cpu-base
|
||||
tags:
|
||||
- cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cpu-base
|
||||
@@ -0,0 +1,21 @@
|
||||
name: "ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base"
|
||||
froms: ["cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base"]
|
||||
dockerfile: docker/ray-ml/Dockerfile
|
||||
srcs:
|
||||
- python/requirements.txt
|
||||
- python/requirements/ml/dl-cpu-requirements.txt
|
||||
- python/requirements/ml/dl-gpu-requirements.txt
|
||||
- python/requirements/ml/core-requirements.txt
|
||||
- python/requirements/ml/data-requirements.txt
|
||||
- python/requirements/ml/rllib-requirements.txt
|
||||
- python/requirements/ml/rllib-test-requirements.txt
|
||||
- python/requirements/ml/train-requirements.txt
|
||||
- python/requirements/ml/train-test-requirements.txt
|
||||
- python/requirements/ml/tune-requirements.txt
|
||||
- python/requirements/ml/tune-test-requirements.txt
|
||||
- python/requirements/docker/ray-docker-requirements.txt
|
||||
- docker/ray-ml/install-ml-docker-requirements.sh
|
||||
build_args:
|
||||
- FULL_BASE_IMAGE=cr.ray.io/rayproject/ray-py$PYTHON_VERSION-cu$CUDA_VERSION-base
|
||||
tags:
|
||||
- cr.ray.io/rayproject/ray-ml-py$PYTHON_VERSION-cu$CUDA_VERSION-base
|
||||
+65
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck disable=SC2139
|
||||
alias pip="$HOME/anaconda3/bin/pip"
|
||||
|
||||
sudo apt-get update \
|
||||
&& sudo apt-get install -y gcc \
|
||||
cmake \
|
||||
libgtk2.0-dev \
|
||||
libgl1-mesa-dev \
|
||||
libgl1-mesa-glx \
|
||||
libosmesa6 \
|
||||
libosmesa6-dev \
|
||||
libglfw3 \
|
||||
patchelf \
|
||||
unzip \
|
||||
unrar \
|
||||
zlib1g-dev
|
||||
|
||||
# Install requirements
|
||||
pip --no-cache-dir install -r requirements.txt -c requirements_compiled.txt
|
||||
|
||||
# Install other requirements. Keep pinned requirements bounds as constraints
|
||||
pip --no-cache-dir install \
|
||||
-c requirements.txt \
|
||||
-c requirements_compiled.txt \
|
||||
-r dl-cpu-requirements.txt \
|
||||
-r core-requirements.txt \
|
||||
-r data-requirements.txt \
|
||||
-r rllib-requirements.txt \
|
||||
-r rllib-test-requirements.txt \
|
||||
-r train-requirements.txt \
|
||||
-r train-test-requirements.txt \
|
||||
-r tune-requirements.txt \
|
||||
-r tune-test-requirements.txt \
|
||||
-r ray-docker-requirements.txt
|
||||
|
||||
|
||||
# Remove any device-specific constraints from requirements_compiled.txt.
|
||||
# E.g.: torch-scatter==2.1.1+pt20cpu or torchvision==0.15.2+cpu
|
||||
# These are replaced with gpu-specific requirements in dl-gpu-requirements.txt.
|
||||
# Also remove pandas and cupy-cuda12x pins so cudf-cu12 dependencies can resolve.
|
||||
sed "/[0-9]\+cpu/d;/[0-9]\+pt/d;/^pandas==/d;/^cupy-cuda12x==/d" "requirements_compiled.txt" > requirements_compiled_gpu.txt
|
||||
|
||||
# explicitly install (overwrite) pytorch with CUDA support
|
||||
pip --no-cache-dir install \
|
||||
-c requirements.txt \
|
||||
-c requirements_compiled_gpu.txt \
|
||||
-r dl-gpu-requirements.txt
|
||||
|
||||
sudo apt-get clean
|
||||
|
||||
# requirements_compiled.txt will be kept.
|
||||
sudo rm ./*requirements.txt requirements_compiled_gpu.txt
|
||||
|
||||
# MuJoCo Installation.
|
||||
export MUJOCO_GL=osmesa
|
||||
wget https://github.com/google-deepmind/mujoco/releases/download/2.1.1/mujoco-2.1.1-linux-x86_64.tar.gz
|
||||
mkdir -p ~/.mujoco
|
||||
mv mujoco-2.1.1-linux-x86_64.tar.gz ~/.mujoco/.
|
||||
cd ~/.mujoco || exit
|
||||
tar -xf ~/.mujoco/mujoco-2.1.1-linux-x86_64.tar.gz
|
||||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/root/.mujoco/mujoco-2.1.1/bin
|
||||
Reference in New Issue
Block a user