Skip to content

Commit b6ab64a

Browse files
committed
Simplify docs workflow
Temporarily switch to linux.g5.4xlarge.nvidia.gpu
1 parent 94ecb6d commit b6ab64a

File tree

1 file changed

+17
-51
lines changed

1 file changed

+17
-51
lines changed

.github/workflows/docs.yaml

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -14,67 +14,36 @@ defaults:
1414
shell: bash -l -eo pipefail {0}
1515

1616
jobs:
17-
generate-matrix:
18-
uses: pytorch/test-infra/.github/workflows/generate_binary_build_matrix.yml@main
19-
with:
20-
package-type: wheel
21-
os: linux
22-
test-infra-repository: pytorch/test-infra
23-
test-infra-ref: main
24-
with-cpu: disable
25-
with-xpu: disable
26-
with-rocm: disable
27-
with-cuda: enable
28-
build-python-only: "disable"
29-
build:
30-
needs: generate-matrix
31-
strategy:
32-
fail-fast: false
33-
name: Build and Upload wheel
34-
uses: pytorch/test-infra/.github/workflows/build_wheels_linux.yml@main
35-
with:
36-
repository: pytorch/audio
37-
ref: ""
38-
test-infra-repository: pytorch/test-infra
39-
test-infra-ref: main
40-
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
41-
package-name: torchaudio
42-
trigger-event: ${{ github.event_name }}
43-
build-platform: "python-build-package"
44-
build-command: "python -m build --wheel -vvv --no-isolation"
45-
4617
build-docs:
47-
runs-on: linux.4xlarge.nvidia.gpu
4818
strategy:
4919
fail-fast: false
5020
matrix:
51-
# 3.10 corresponds to the minimum python version for which we build
52-
# the wheel unless the label cliflow/binaries/all is present in the
53-
# PR.
5421
python-version: ['3.10']
5522
cuda-version: ['12.6']
56-
ffmpeg-version-for-tests: ['7']
57-
container:
58-
image: "pytorch/manylinux2_28-builder:cuda${{ matrix.cuda-version }}"
59-
options: "--gpus all -e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility"
60-
needs: build
23+
ffmpeg-version: ['7']
24+
runs-on: linux.g5.4xlarge.nvidia.gpu
25+
env:
26+
REPOSITORY: pytorch/audio
27+
REF: ""
6128
steps:
6229
- name: Setup env vars
6330
run: |
6431
cuda_version_without_periods=$(echo "${{ matrix.cuda-version }}" | sed 's/\.//g')
6532
echo cuda_version_without_periods=${cuda_version_without_periods} >> $GITHUB_ENV
6633
python_version_without_periods=$(echo "${{ matrix.python-version }}" | sed 's/\.//g')
6734
echo python_version_without_periods=${python_version_without_periods} >> $GITHUB_ENV
68-
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
69-
with:
70-
name: pytorch_audio__${{ matrix.python-version }}_cu${{ env.cuda_version_without_periods }}_x86_64
71-
path: pytorch/audio/dist/
7235
- name: Setup miniconda using test-infra
7336
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
7437
with:
7538
python-version: ${{ matrix.python-version }}
7639
# We install conda packages at the start because otherwise conda may have conflicts with dependencies.
77-
default-packages: "nvidia/label/cuda-${{ matrix.cuda-version }}.0::libnpp nvidia::cuda-nvrtc=${{ matrix.cuda-version }} nvidia::cuda-toolkit=${{ matrix.cuda-version }} nvidia::cuda-cudart=${{ matrix.cuda-version }} nvidia::cuda-driver-dev=${{ matrix.cuda-version }} conda-forge::ffmpeg=${{ matrix.ffmpeg-version-for-tests }}"
40+
default-packages: "nvidia/label/cuda-${{ matrix.cuda-version }}.0::libnpp nvidia::cuda-nvrtc=${{ matrix.cuda-version }} nvidia::cuda-toolkit=${{ matrix.cuda-version }} nvidia::cuda-cudart=${{ matrix.cuda-version }} nvidia::cuda-driver-dev=${{ matrix.cuda-version }} conda-forge::ffmpeg=${{ matrix.ffmpeg-version }} cmake ninja"
41+
- uses: pytorch/test-infra/.github/actions/setup-binary-builds@main
42+
with:
43+
setup-miniconda: false
44+
python-version: ${{ matrix.python-version }}
45+
cuda-version: ${{ matrix.cuda-version }}
46+
repository: ""
7847
- name: Check env
7948
run: |
8049
${CONDA_RUN} env
@@ -90,15 +59,12 @@ jobs:
9059
run: |
9160
${CONDA_RUN} python -m pip install --pre torch torchcodec --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }}
9261
${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")'
93-
- name: Install torchaudio from the wheel
94-
run: |
95-
wheel_path=`find pytorch/audio/dist -type f -name "*cu${{ env.cuda_version_without_periods }}-cp${{ env.python_version_without_periods }}*.whl"`
96-
echo Installing $wheel_path
97-
${CONDA_RUN} python -m pip install $wheel_path -vvv
98-
9962
- name: Check out repo
10063
uses: actions/checkout@v3
101-
64+
- name: Install torchaudio
65+
run: |
66+
export USE_CUDA=1
67+
${CONDA_RUN} python -m pip install . -v --no-build-isolation
10268
- name: Install doc dependencies
10369
run: |
10470
cd docs
@@ -110,4 +76,4 @@ jobs:
11076
- uses: actions/upload-artifact@v4
11177
with:
11278
name: Built-Docs
113-
path: docs/build/html/
79+
path: docs/build/html/

0 commit comments

Comments
 (0)