Skip to content

Commit 7f9fa9a

Browse files
committed
edit
1 parent e583693 commit 7f9fa9a

2 files changed

Lines changed: 18 additions & 32 deletions

File tree

.github/workflows/docs.yml

Lines changed: 15 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -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

docs/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@ matplotlib
22
numpy
33
sphinx-copybutton
44
sphinx-gallery
5-
sphinx===5.0.0
5+
sphinx>=5.0.0,<8.0.0
66
Jinja2==3.1.4
77
sphinx-autodoc-typehints
88
sphinx-serve==1.0.1
99
git+https://github.com/vmoens/aafig@4319769eae88fff8e3464858f3cf8c277f35335d
1010
sphinxcontrib-htmlhelp
11-
pytorch-sphinx-theme2 @ git+https://github.com/pytorch/pytorch_sphinx_theme.git
11+
pytorch-sphinx-theme
1212
myst-parser
1313
docutils
1414
sphinx_design
1515

1616
torchvision
1717
dm_control>=1.0.0
1818
mujoco>=3.0.0,<3.3.6
19-
gymnasium[classic_control,atari]
19+
gymnasium[classic_control,atari,mujoco]
2020
pygame
2121
tqdm
2222
ipython

0 commit comments

Comments
 (0)