mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
[Docker] Fix torch GPU install on Ray Docker images (#15473)
Co-authored-by: Ian Rodney <ian.rodney@gmail.com>
This commit is contained in:
parent
a78af85b1c
commit
544dff80fa
3 changed files with 38 additions and 10 deletions
39
.travis.yml
39
.travis.yml
|
@ -151,10 +151,10 @@ matrix:
|
||||||
- bash ./java/build-jar-multiplatform.sh linux
|
- bash ./java/build-jar-multiplatform.sh linux
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
# Build Py36 & Py38 Docker Images
|
# Build Py36 Docker Image
|
||||||
- os: linux
|
- os: linux
|
||||||
env:
|
env:
|
||||||
- LINUX_WHEELS=1 DOCKER_BUILD_PY36_38=1
|
- LINUX_WHEELS=1 DOCKER_BUILD_PY36=1
|
||||||
- PYTHONWARNINGS=ignore
|
- PYTHONWARNINGS=ignore
|
||||||
language: java
|
language: java
|
||||||
jdk: openjdk8
|
jdk: openjdk8
|
||||||
|
@ -168,7 +168,27 @@ matrix:
|
||||||
- export PATH="$HOME/miniconda3/bin:$PATH"
|
- export PATH="$HOME/miniconda3/bin:$PATH"
|
||||||
- conda install -y python=3.7.6
|
- conda install -y python=3.7.6
|
||||||
- python -m pip install docker
|
- python -m pip install docker
|
||||||
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY36 PY38 --build-type PR --build-base; fi
|
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY36 --build-type PR --build-base; fi
|
||||||
|
cache: false
|
||||||
|
|
||||||
|
# Build Py38 Docker Image
|
||||||
|
- os: linux
|
||||||
|
env:
|
||||||
|
- LINUX_WHEELS=1 DOCKER_BUILD_PY38=1
|
||||||
|
- PYTHONWARNINGS=ignore
|
||||||
|
language: java
|
||||||
|
jdk: openjdk8
|
||||||
|
install:
|
||||||
|
- . ./ci/travis/ci.sh init RAY_CI_LINUX_WHEELS_AFFECTED
|
||||||
|
before_script:
|
||||||
|
- . ./ci/travis/ci.sh build
|
||||||
|
script:
|
||||||
|
- wget --quiet "https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh" -O miniconda3.sh
|
||||||
|
- bash miniconda3.sh -b -p "$HOME/miniconda3"
|
||||||
|
- export PATH="$HOME/miniconda3/bin:$PATH"
|
||||||
|
- conda install -y python=3.7.6
|
||||||
|
- python -m pip install docker
|
||||||
|
- if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY38 --build-type PR --build-base; fi
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
# Build and deploy multi-platform jars.
|
# Build and deploy multi-platform jars.
|
||||||
|
@ -278,9 +298,18 @@ deploy:
|
||||||
|
|
||||||
- provider: script
|
- provider: script
|
||||||
edge: true # This supposedly opts in to deploy v2.
|
edge: true # This supposedly opts in to deploy v2.
|
||||||
script: export PATH="$HOME/miniconda3/bin:$PATH"; ./ci/keep_alive python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY36 PY38 --build-type MERGE --build-base
|
script: export PATH="$HOME/miniconda3/bin:$PATH"; ./ci/keep_alive python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY36 --build-type MERGE --build-base
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
repo: ray-project/ray
|
repo: ray-project/ray
|
||||||
all_branches: true
|
all_branches: true
|
||||||
condition: $LINUX_WHEELS = 1 && $DOCKER_BUILD_PY36_38 = 1
|
condition: $LINUX_WHEELS = 1 && $DOCKER_BUILD_PY36 = 1
|
||||||
|
|
||||||
|
- provider: script
|
||||||
|
edge: true # This supposedly opts in to deploy v2.
|
||||||
|
script: export PATH="$HOME/miniconda3/bin:$PATH"; ./ci/keep_alive python $TRAVIS_BUILD_DIR/ci/travis/build-docker-images.py --py-versions PY38 --build-type MERGE --build-base
|
||||||
|
skip_cleanup: true
|
||||||
|
on:
|
||||||
|
repo: ray-project/ray
|
||||||
|
all_branches: true
|
||||||
|
condition: $LINUX_WHEELS = 1 && $DOCKER_BUILD_PY38 = 1
|
||||||
|
|
|
@ -14,14 +14,14 @@ RUN sudo apt-get update \
|
||||||
libgtk2.0-dev \
|
libgtk2.0-dev \
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
libgl1-mesa-dev \
|
libgl1-mesa-dev \
|
||||||
&& $HOME/anaconda3/bin/pip --no-cache-dir install -U -r requirements_ml_docker.txt \
|
&& $HOME/anaconda3/bin/pip install -U pip \
|
||||||
&& $HOME/anaconda3/bin/pip --use-deprecated=legacy-resolver --no-cache-dir install -r requirements.txt \
|
&& $HOME/anaconda3/bin/pip --use-deprecated=legacy-resolver --no-cache-dir install -r requirements.txt \
|
||||||
&& $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements_rllib.txt \
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements_rllib.txt \
|
||||||
&& $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements_tune.txt \
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -r requirements_tune.txt \
|
||||||
|
&& $HOME/anaconda3/bin/pip --no-cache-dir install -U -r requirements_ml_docker.txt \
|
||||||
# Remove dataclasses & typing because they are included in Python > 3.6
|
# Remove dataclasses & typing because they are included in Python > 3.6
|
||||||
&& if [ $(python -c 'import sys; print(sys.version_info.minor)') != "6" ]; then \
|
&& if [ $(python -c 'import sys; print(sys.version_info.minor)') != "6" ]; then \
|
||||||
$HOME/anaconda3/bin/pip uninstall dataclasses typing -y; fi \
|
$HOME/anaconda3/bin/pip uninstall dataclasses typing -y; fi \
|
||||||
&& sudo rm requirements.txt && sudo rm requirements_ml_docker.txt \
|
&& sudo rm requirements.txt && sudo rm requirements_ml_docker.txt \
|
||||||
&& sudo rm requirements_tune.txt && sudo rm requirements_rllib.txt \
|
&& sudo rm requirements_tune.txt && sudo rm requirements_rllib.txt \
|
||||||
&& sudo apt-get clean
|
&& sudo apt-get clean
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
ipython
|
ipython
|
||||||
tensorflow-gpu>=2.4.0
|
tensorflow-gpu>=2.4.0
|
||||||
-f https://download.pytorch.org/whl/torch_stable.html
|
-f https://download.pytorch.org/whl/torch_stable.html
|
||||||
torch==1.7.1+cu110
|
torch==1.8.1+cu111
|
||||||
-f https://download.pytorch.org/whl/torch_stable.html
|
-f https://download.pytorch.org/whl/torch_stable.html
|
||||||
torchvision==0.8.2+cu110
|
torchvision==0.9.1+cu111
|
||||||
pip; python_version > "3.7"
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue