Skip to content

Commit

Permalink
Update docs.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
vmoens authored Nov 8, 2023
1 parent 8941d38 commit 7bdf0ff
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

jobs:
unittests:
build-docs:
strategy:
matrix:
python_version: ["3.9"]
Expand All @@ -33,7 +33,6 @@ jobs:
conda_dir="${root_dir}/conda"
env_dir="${root_dir}/env"
os=Linux
# 1. Install conda at ./conda
printf "* Installing conda\n"
wget -O miniconda.sh "http://repo.continuum.io/miniconda/Miniconda3-latest-${os}-x86_64.sh"
Expand All @@ -43,45 +42,36 @@ jobs:
conda create --prefix "${env_dir}" -y python=3.8
printf "* Activating\n"
conda activate "${env_dir}"
# 2. upgrade pip, ninja and packaging
apt-get install python3.8 python3-pip -y
python3 -m pip install --upgrade pip
python3 -m pip install setuptools ninja packaging -U
# 3. check python version
python3 --version
# 4. Check git version
git version
# 5. Install PyTorch
python3 -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cpu --quiet --root-user-action=ignore
# 6. Install tensordict
python3 -m pip install git+https://github.com/pytorch/tensordict.git --quiet --root-user-action=ignore
# 7. Install TorchRL
python3 setup.py develop
# 8. Install requirements
python3 -m pip install -r docs/requirements.txt --quiet --root-user-action=ignore
# 9. Test torchrl installation
mkdir _tmp
cd _tmp
PYOPENGL_PLATFORM=egl MUJOCO_GL=egl python3 -c """from torchrl.envs.libs.dm_control import DMControlEnv
print(DMControlEnv('cheetah', 'run', from_pixels=True).reset())"""
cd ..
# 10. Build doc
cd ./docs
# timeout 7m bash -ic "MUJOCO_GL=egl sphinx-build ./source _local_build" || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
bash -ic "PYOPENGL_PLATFORM=egl MUJOCO_GL=egl sphinx-build ./source _local_build" || code=$?; if [[ $code -ne 124 && $code -ne 0 ]]; then exit $code; fi
# PYOPENGL_PLATFORM=egl MUJOCO_GL=egl sphinx-build ./source _local_build
cd ..
upload-docs:
needs: build_docs_job
needs: build-docs
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.2xlarge
Expand Down

0 comments on commit 7bdf0ff

Please sign in to comment.