Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
176 changes: 0 additions & 176 deletions .github/workflows/build_docs.yml

This file was deleted.

71 changes: 71 additions & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Docs

on:
pull_request:
push:
branches:
- nightly
- main
- release/*
workflow_dispatch:

jobs:
build:
strategy:
matrix:
# TODO add up to 3.13
python_version: ["3.10"]
cuda-version: ["12.6"]
fail-fast: false
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
permissions:
id-token: write
contents: read
with:
runner: linux.g5.4xlarge.nvidia.gpu
repository: pytorch/audio
gpu-arch-type: cuda
gpu-arch-version: ${{ matrix.cuda-version }}
timeout: 120
job-name: docs
# run-with-docker: false

script: |
set -ex
# Set up Environment Variables
export PYTHON_VERSION="${{ matrix.python_version }}"
export PIP_PROGRESS_BAR=off
export CONDA_QUIET=1
export CU_VERSION="${{ matrix.cuda-version }}"
export CU_VERSION_WITHOUT_PERIODS="$(echo "${{ matrix.cuda-version }}" | sed 's/\.//g')"
# Set UPLOAD_CHANNEL
if [[(${GITHUB_EVENT_NAME} = 'pull_request' && (${GITHUB_BASE_REF} = 'release'*)) || (${GITHUB_REF} = 'refs/heads/release'*) ]]; then
export UPLOAD_CHANNEL=test
else
export UPLOAD_CHANNEL=nightly
fi

echo "::group::Create conda env"
# Mark Build Directory Safe
git config --global --add safe.directory /__w/audio/audio
conda create -c conda-forge --strict-channel-priority -y --prefix ci_env python="${PYTHON_VERSION}" ffmpeg=7 cmake ninja
conda activate ./ci_env
conda info

python -m pip install --upgrade pip

echo "::endgroup::"
echo "::group::Install PyTorch and TorchCodec"
PYTORCH_WHEEL_INDEX="https://download.pytorch.org/whl/${UPLOAD_CHANNEL}/cu${CU_VERSION_WITHOUT_PERIODS}"
python -m pip install --progress-bar=off --pre torch torchcodec --index-url="${PYTORCH_WHEEL_INDEX}"
python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")'
echo "::endgroup::"
echo "::group::Build and install TorchAudio"
python -m pip install . -v --no-build-isolation
echo "::endgroup::"
echo "::group::Build TorchAudio documentation"
cd docs
python -m pip install -r requirements.txt -r requirements-tutorials.txt
make html
echo "::endgroup::"
# TODO: upload
Loading