@@ -34,38 +34,18 @@ jobs:
3434 repository : pytorch/rl
3535 upload-artifact : docs
3636 timeout : 120
37+ # Use PyTorch image with newer GCC for GLIBCXX_3.4.30 support (needed by AOTInductor in export.py)
38+ docker-image : pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel
3739 script : |
3840 set -e
3941 set -v
40- yum makecache
41- # Install Mesa and OpenGL Libraries:
42- yum install -y glfw mesa-libGL mesa-libGL-devel egl-utils freeglut mesa-libGLU mesa-libEGL python39-pip
43- yum install epel-release -y # for missing librhash0 when installing tensordict
44- yum install rhash -y # Provides librhash.so.0 needed by cmake
45- # Install DRI Drivers:
46- yum install -y mesa-dri-drivers
47- # Install Xvfb for Headless Environments:
48- yum install -y xorg-x11-server-Xvfb
49- # xhost +local:docker
50- # Xvfb :1 -screen 0 1024x768x24 &
51-
52- root_dir="$(pwd)"
53- conda_dir="${root_dir}/conda"
54- env_dir="${root_dir}/env"
55- os=Linux
5642
57- # 1. Install conda at ./conda
58- printf "* Installing conda\n"
59- wget -O miniconda.sh "http://repo.continuum.io/miniconda/Miniconda3-latest-${os}-x86_64.sh"
60- bash ./miniconda.sh -b -f -p "${conda_dir}"
61- eval "$(${conda_dir}/bin/conda shell.bash hook)"
62- printf "* Creating a test environment\n"
63- conda create --prefix "${env_dir}" -y python=3.12
64- printf "* Activating\n"
65- conda activate "${env_dir}"
66-
43+ # Install system dependencies (Ubuntu-based PyTorch image)
44+ apt-get update
45+ apt-get install -y libglfw3 libglfw3-dev libgl1-mesa-glx libgl1-mesa-dev libegl1-mesa-dev \
46+ freeglut3-dev libglu1-mesa libegl1 mesa-utils xvfb wget git cmake
47+
6748 # 2. upgrade pip, ninja and packaging
68- conda install anaconda::cmake -y
6949 python -m pip install --upgrade pip
7050 python -m pip install setuptools ninja packaging "pybind11[global]" -U
7151
@@ -76,10 +56,16 @@ jobs:
7656 git version
7757
7858 # 5. Install PyTorch
59+ # Uninstall pre-installed packages from Docker image to avoid conflicts
60+ # (gym conflicts with gymnasium, torch/torchaudio versions conflict with nightly)
61+ python -m pip uninstall -y torch torchvision torchaudio gym || true
62+
7963 if [[ ${{ github.event_name }} == push && (${{ github.ref_type }} == tag || (${{ github.ref_type }} == branch && ${{ github.ref_name }} == release/*)) ]]; then
80- python -m pip install torch torchvision
81- python -m pip install tensordict
64+ # Use stable PyTorch for releases (tags and release/* branches)
65+ python -m pip install torch torchvision --quiet --root-user-action=ignore
66+ python -m pip install tensordict --quiet --root-user-action=ignore
8267 else
68+ # Use nightly PyTorch for main, nightly, and PRs
8369 python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu -U --quiet --root-user-action=ignore
8470 python -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore
8571 fi
0 commit comments