Skip to content

Commit 3f85afa

Browse files
committed
.
1 parent f29b05c commit 3f85afa

File tree

2 files changed

+25
-87
lines changed

2 files changed

+25
-87
lines changed

.github/workflows/docs.yaml

Lines changed: 24 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,109 +1,47 @@
11
name: Docs
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
8-
permissions:
9-
id-token: write
10-
contents: write
4+
workflow_run:
5+
workflows: [linux_cuda_wheels]
6+
types:
7+
- completed
118

129
defaults:
1310
run:
1411
shell: bash -l -eo pipefail {0}
1512

1613
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"
2914
build:
30-
needs: generate-matrix
15+
runs-on: linux.g5.4xlarge.nvidia.gpu
3116
strategy:
3217
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/torchcodec
37-
ref: ""
38-
test-infra-repository: pytorch/test-infra
39-
test-infra-ref: main
40-
build-matrix: ${{ needs.generate-matrix.outputs.matrix }}
41-
post-script: packaging/post_build_script.sh
42-
smoke-test-script: packaging/fake_smoke_test.py
43-
package-name: torchcodec
44-
trigger-event: ${{ github.event_name }}
45-
build-platform: "python-build-package"
46-
build-command: "BUILD_AGAINST_ALL_FFMPEG_FROM_S3=1 ENABLE_CUDA=1 python -m build --wheel -vvv --no-isolation"
47-
48-
build-docs:
49-
runs-on: linux.4xlarge.nvidia.gpu
50-
strategy:
51-
fail-fast: false
52-
matrix:
53-
# 3.9 corresponds to the minimum python version for which we build
54-
# the wheel unless the label cliflow/binaries/all is present in the
55-
# PR.
56-
# For the actual release we should add that label and change this to
57-
# include more python versions.
58-
python-version: ['3.9']
59-
cuda-version: ['12.4']
60-
ffmpeg-version-for-tests: ['7']
61-
container:
62-
image: "pytorch/manylinux-builder:cuda${{ matrix.cuda-version }}"
63-
options: "--gpus all -e NVIDIA_DRIVER_CAPABILITIES=video,compute,utility"
64-
needs: build
6518
steps:
66-
- name: Setup env vars
67-
run: |
68-
cuda_version_without_periods=$(echo "${{ matrix.cuda-version }}" | sed 's/\.//g')
69-
echo cuda_version_without_periods=${cuda_version_without_periods} >> $GITHUB_ENV
70-
- uses: actions/download-artifact@v3
71-
with:
72-
name: pytorch_torchcodec__3.9_cu${{ env.cuda_version_without_periods }}_x86_64
73-
path: pytorch/torchcodec/dist/
74-
- name: Setup miniconda using test-infra
75-
uses: pytorch/test-infra/.github/actions/setup-miniconda@main
19+
- name: Check out repo
20+
uses: actions/checkout@v3
21+
- name: Setup conda env
22+
uses: conda-incubator/setup-miniconda@v2
7623
with:
77-
python-version: ${{ matrix.python-version }}
78-
#
79-
# For some reason nvidia::libnpp=12.4 doesn't install but nvidia/label/cuda-12.4.0::libnpp does.
80-
# So we use the latter convention for libnpp.
81-
# We install conda packages at the start because otherwise conda may have conflicts with dependencies.
82-
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 }}"
83-
- name: Check env
84-
run: |
85-
${CONDA_RUN} env
86-
${CONDA_RUN} conda info
87-
${CONDA_RUN} nvidia-smi
88-
${CONDA_RUN} conda list
89-
- name: Assert ffmpeg exists
90-
run: |
91-
${CONDA_RUN} ffmpeg -buildconf
24+
auto-update-conda: true
25+
miniconda-version: "latest"
26+
activate-environment: test
27+
python-version: '3.9'
9228
- name: Update pip
93-
run: ${CONDA_RUN} python -m pip install --upgrade pip
94-
- name: Install PyTorch
95-
run: |
96-
${CONDA_RUN} python -m pip install --pre torch torchvision --index-url https://download.pytorch.org/whl/nightly/cu${{ env.cuda_version_without_periods }}
97-
${CONDA_RUN} python -c 'import torch; print(f"{torch.__version__}"); print(f"{torch.__file__}"); print(f"{torch.cuda.is_available()=}")'
29+
run: python -m pip install --upgrade pip
30+
- name: Download wheel
31+
uses: actions/download-artifact@v3
32+
with:
33+
name: pytorch_torchcodec__3.9_cu124_x86_64
34+
path: pytorch/torchcodec/dist/
9835
- name: Install torchcodec from the wheel
9936
run: |
10037
wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"`
10138
echo Installing $wheel_path
10239
${CONDA_RUN} python -m pip install $wheel_path -vvv
103-
104-
- name: Check out repo
105-
uses: actions/checkout@v3
106-
40+
- name: Install FFMPEG and other deps
41+
run: |
42+
conda install cuda-nvrtc=12.4 libnpp -c nvidia
43+
conda install ffmpeg=7 -c conda-forge
44+
ffmpeg -version
10745
- name: Install doc dependencies
10846
run: |
10947
cd docs

.github/workflows/linux_cuda_wheel.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and test Linux CUDA wheels
1+
name: linux_cuda_wheels
22

33
on:
44
pull_request:

0 commit comments

Comments
 (0)