@@ -5,64 +5,67 @@ name: Generate Docs
5
5
# Controls when the action will run. Triggers the workflow on push or pull request
6
6
# events but only for the master branch
7
7
on :
8
- push :
9
- branches : [ main ]
8
+ push :
9
+ branches : [main]
10
10
11
11
jobs :
12
- build-docs :
13
- runs-on : linux.g5.4xlarge.nvidia.gpu
14
- if : ${{ ! contains(github.actor, 'pytorchbot') }}
15
- environment : pytorchbot-env
16
- container :
17
- image : docker.io/pytorch/manylinux2_28-builder:cuda12.6
18
- options : --gpus all
19
- env :
20
- CUDA_HOME : /usr/local/cuda-12.6
21
- VERSION_SUFFIX : cu126
22
- CU_VERSION : cu126
23
- CHANNEL : nightly
24
- CI_BUILD : 1
25
- steps :
26
- - uses : actions/checkout@v3
27
- with :
28
- ref : ${{github.head_ref}}
29
- token : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
30
- - name : Select Python / CUDA
31
- run : |
32
- git config --global --add safe.directory /__w/TensorRT/TensorRT
33
- echo "/opt/python/cp311-cp311/bin/" >> $GITHUB_PATH
12
+ build-docs :
13
+ runs-on : linux.g5.4xlarge.nvidia.gpu
14
+ if : ${{ ! contains(github.actor, 'pytorchbot') }}
15
+ environment : pytorchbot-env
16
+ container :
17
+ image : docker.io/pytorch/manylinux2_28-builder:cuda12.6
18
+ options : --gpus all
19
+ env :
20
+ CUDA_HOME : /usr/local/cuda-12.6
21
+ VERSION_SUFFIX : cu126
22
+ CU_VERSION : cu126
23
+ CHANNEL : nightly
24
+ CI_BUILD : 1
25
+ steps :
26
+ - uses : actions/checkout@v3
27
+ with :
28
+ ref : ${{github.head_ref}}
29
+ token : ${{ secrets.GH_PYTORCHBOT_TOKEN }}
30
+ - name : Select Python / CUDA
31
+ run : |
32
+ git config --global --add safe.directory /__w/TensorRT/TensorRT
33
+ echo "/opt/python/cp311-cp311/bin/" >> $GITHUB_PATH
34
34
35
- - name : Install base deps
36
- run : |
37
- python3 -m pip install pip --upgrade
38
- python3 -m pip install pyyaml numpy torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu124
39
- ./packaging/pre_build_script.sh
40
- - name : Get HEAD SHA
41
- id : vars
42
- run : echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
43
- - name : Build Python Package
44
- run : |
45
- python3 -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu124
46
- - name : Generate New Docs
47
- run : |
48
- cd docsrc
49
- dnf clean all
50
- dnf update
51
- dnf install -y doxygen pandoc --allowerasing --nobest
52
- python3 -m pip install -r requirements.txt
53
- python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
54
- make html
55
- cd ..
56
- - uses : stefanzweifel/git-auto-commit-action@v4
57
- with :
58
- # Required
59
- commit_message : " docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}"
60
- commit_options : " --no-verify --signoff"
61
- file_pattern : docs/
62
- commit_user_name : Torch-TensorRT Github Bot
63
- commit_user_email :
[email protected]
64
- commit_author :
Torch-TensorRT Github Bot <[email protected] >
35
+ - name : Install base deps
36
+ run : |
37
+ python3 -m pip install pip --upgrade
38
+ python3 -m pip install pyyaml numpy torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu124
39
+ ./packaging/pre_build_script.sh
40
+ - name : Get HEAD SHA
41
+ id : vars
42
+ run : echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
43
+ - name : Build Python Package
44
+ run : |
45
+ python3 -m pip install --pre . --extra-index-url https://download.pytorch.org/whl/nightly/cu124
46
+ - name : Generate New Docs
47
+ run : |
48
+ cd docsrc
49
+ dnf clean all
50
+ dnf makecache --refresh
51
+ dnf install yum-utils -y
52
+ dnf config-manager --set-enabled powertools
53
+ dnf update --skip-broken --nobest
54
+ dnf install -y doxygen pandoc
55
+ python3 -m pip install -r requirements.txt
56
+ python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
57
+ make html
58
+ cd ..
59
+ - uses : stefanzweifel/git-auto-commit-action@v4
60
+ with :
61
+ # Required
62
+ commit_message : " docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}"
63
+ commit_options : " --no-verify --signoff"
64
+ file_pattern : docs/
65
+ commit_user_name : Torch-TensorRT Github Bot
66
+ commit_user_email :
[email protected]
67
+ commit_author :
Torch-TensorRT Github Bot <[email protected] >
65
68
66
69
concurrency :
67
- group : ${{ github.workflow }}-${{ github.ref_name }}
68
- cancel-in-progress : true
70
+ group : ${{ github.workflow }}-${{ github.ref_name }}
71
+ cancel-in-progress : true
0 commit comments