Skip to content

Commit a879aae

Browse files
committed
chore: fix the docgen job
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent aa1c843 commit a879aae

File tree

2 files changed

+22
-51
lines changed

2 files changed

+22
-51
lines changed

.github/workflows/docgen.yml

Lines changed: 9 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,33 @@ jobs:
1212
build-docs:
1313
runs-on: ubuntu-20.04
1414
container:
15-
image: ghcr.io/pytorch/tensorrt/docgen:latest
15+
image: docker.io/pytorch/manylinux-builder:cuda12.1
1616
credentials:
1717
username: ${{ github.actor }}
1818
password: ${{ secrets.GITHUB_TOKEN }}
1919
steps:
20-
- name: Reclaim space
21-
run: |
22-
rm -rf /usr/share/dotnet
23-
rm -rf /opt/ghc
24-
rm -rf "/usr/local/share/boost"
25-
rm -rf /usr/local/cuda/cuda-*
26-
- name: Install base deps
27-
run: |
28-
apt update
29-
DEBIAN_FRONTEND=noninteractive apt install -y software-properties-common gcc git curl wget make zlib1g-dev bzip2 libbz2-dev lzma lzma-dev libreadline-dev libsqlite3-dev libssl-dev libffi-dev doxygen pandoc
30-
git config --global --add safe.directory '*'
31-
- name: Set up Python 3.10.12
32-
uses: actions/setup-python@v4
33-
with:
34-
python-version: 3.10.12
3520
- uses: actions/checkout@v3
3621
with:
3722
ref: ${{github.head_ref}}
23+
- name: Install base deps
24+
run: |
25+
./packaging/pre_build_script.sh
3826
- name: Get HEAD SHA
3927
id: vars
4028
run: echo "sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
4129
- name: Get Bazel version
4230
id: bazel_info
4331
run: echo "version=$(cat .bazelversion)" >> $GITHUB_OUTPUT
44-
- name: Install Bazel
45-
run: |
46-
wget -q https://github.com/bazelbuild/bazel/releases/download/${{ steps.bazel_info.outputs.version }}/bazel-${{ steps.bazel_info.outputs.version }}-linux-x86_64 -O /usr/bin/bazel
47-
chmod a+x /usr/bin/bazel
48-
- name: Install cudnn + tensorrt
49-
run: |
50-
apt-get update
51-
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
52-
mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
53-
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
54-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 536F8F1DE80F6A35
55-
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
56-
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
57-
apt-get update
58-
apt-get install -y libcudnn8 libcudnn8-dev
59-
60-
apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub
61-
add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
62-
apt-get update
63-
64-
apt-get install -y libnvinfer8 libnvinfer-plugin8 libnvinfer-dev libnvinfer-plugin-dev
65-
- name: Install Torch
66-
run: |
67-
python3 -m pip install -r py/requirements.txt --user
6832
- name: Build Python Package
6933
run: |
70-
cp toolchains/ci_workspaces/WORKSPACE.x86_64 WORKSPACE
71-
cd py
72-
python3 -m pip install pip==21.3.1
73-
echo $(which python3)
74-
echo $(python3 -c 'import site; print(site.getsitepackages()[0])')
75-
mkdir -p /opt/circleci/.pyenv/versions/3.9.4/lib/python3.9/
76-
ln -s $(python3 -c 'import site; print(site.getsitepackages()[0])') /opt/circleci/.pyenv/versions/3.9.4/lib/python3.9/site-packages
77-
python3 setup.py install
78-
cd ..
34+
cp toolchains/ci_workspaces/WORKSPACE.x86_64.cu121.release.rhel WORKSPACE
35+
python -m pip install pip<=23
36+
python -m pip install --pre -e . --extra-index-url https://download.pytorch.org/whl/nightly/cu121
7937
- name: Generate New Docs
8038
run: |
8139
cd docsrc
82-
python3 -m pip install -r requirements.txt
83-
python3 -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
40+
python -m pip install -r requirements.txt
41+
python -c "import torch_tensorrt; print(torch_tensorrt.__version__)"
8442
make html
8543
cd ..
8644
- uses: stefanzweifel/git-auto-commit-action@v4

packaging/pre_build_script.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
# Install dependencies
4+
TRT_VERSION=$(python3 -c "import versions; versions.tensorrt_version()")
5+
yum-config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel7/x86_64/cuda-rhel7.repo
6+
yum check-update
7+
yum install -y ninja-build tensorrt-${TRT_VERSION}.*
8+
wget https://github.com/bazelbuild/bazelisk/releases/download/v1.17.0/bazelisk-linux-amd64 \
9+
&& mv bazelisk-linux-amd64 /usr/bin/bazel \
10+
&& chmod +x /usr/bin/bazel
11+
12+
cp toolchains/ci_workspaces/WORKSPACE.x86_64.${VERSION_SUFFIX#*+}.release.rhel WORKSPACE
13+
export CI_BUILD=1

0 commit comments

Comments
 (0)