|
1 | 1 | name: Docs |
2 | 2 |
|
3 | 3 | 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 |
11 | 8 |
|
12 | 9 | defaults: |
13 | 10 | run: |
14 | 11 | shell: bash -l -eo pipefail {0} |
15 | 12 |
|
16 | 13 | 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 | 14 | build: |
30 | | - needs: generate-matrix |
| 15 | + runs-on: linux.g5.4xlarge.nvidia.gpu |
31 | 16 | strategy: |
32 | 17 | 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 |
65 | 18 | 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 |
76 | 23 | 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' |
92 | 28 | - 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/ |
98 | 35 | - name: Install torchcodec from the wheel |
99 | 36 | run: | |
100 | 37 | wheel_path=`find pytorch/torchcodec/dist -type f -name "*.whl"` |
101 | 38 | echo Installing $wheel_path |
102 | 39 | ${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 |
107 | 45 | - name: Install doc dependencies |
108 | 46 | run: | |
109 | 47 | cd docs |
|
0 commit comments