-
Notifications
You must be signed in to change notification settings - Fork 410
79 lines (74 loc) · 3.47 KB
/
Copy pathdocgen.yml
File metadata and controls
79 lines (74 loc) · 3.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# This is a basic workflow to help you get started with Actions
name: Generate Docs
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [main]
jobs:
build-docs:
runs-on: linux.g5.4xlarge.nvidia.gpu
if: ${{ ! contains(github.actor, 'pytorchbot') }}
environment: pytorchbot-env
container:
image: docker.io/pytorch/manylinux2_28-builder:cuda13.0
options: --gpus all
env:
CUDA_HOME: /usr/local/cuda-13.0
VERSION_SUFFIX: cu130
CU_VERSION: cu130
CHANNEL: nightly
CI_BUILD: 1
steps:
- uses: actions/checkout@v6
with:
ref: ${{github.head_ref}}
token: ${{ secrets.GH_PYTORCHBOT_TOKEN }}
- name: Select Python / CUDA
run: |
git config --global --add safe.directory /__w/TensorRT/TensorRT
echo "/opt/python/cp311-cp311/bin/" >> $GITHUB_PATH
- name: Install base deps
run: |
python3 -m pip install pip --upgrade
python3 -m pip install pyyaml numpy torch --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu130
./packaging/pre_build_script.sh
- name: Get HEAD SHA
id: vars
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build Python Package
run: |
# The pin exactly, not the range the extra expands to: --pre plus a nightly
# channel that gains a member daily would otherwise install whichever dev build
# is newest that morning while the delegate compiles from the pinned commit.
python3 -m pip install --pre ".[executorch]" \
"executorch==$(python3 -c 'import yaml;print(yaml.safe_load(open("dev_dep_versions.yml"))["__executorch_version__"])')" \
--extra-index-url https://download.pytorch.org/whl/nightly/cu130
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Generate New Docs
run: |
dnf clean all
dnf makecache --refresh
dnf install yum-utils -y
dnf config-manager --set-enabled powertools
dnf update --skip-broken --nobest -y
dnf install -y doxygen pandoc
uv pip install --system -r docsrc/requirements.txt
python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
cd docsrc && make html
cd ..
- uses: stefanzweifel/git-auto-commit-action@v4
with:
# Required
commit_message: "docs: [Automated] Regenerating documenation for ${{ steps.vars.outputs.sha }}"
commit_options: "--no-verify --signoff"
file_pattern: docs/
commit_user_name: Torch-TensorRT Github Bot
commit_user_email: torch-tensorrt.github.bot@nvidia.com
commit_author: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com>
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true