Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: build manylinux compatible builds #1527

Merged
merged 28 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7c946ff
feat: build manylinux compatible builds
narendasan Dec 5, 2022
c808089
chore: pickup builds from wheelhouse
narendasan Dec 5, 2022
31d0a0a
ci: Parallelize packaging builds
narendasan Dec 5, 2022
ac3c596
chore: split builds
narendasan Dec 5, 2022
35b97dc
feat: do testing with release packages
narendasan Dec 5, 2022
59df0fb
chore: fix splitting
narendasan Dec 7, 2022
a920e21
Update config.yml
narendasan Dec 7, 2022
6891c24
chore: install auditwheel
narendasan Dec 7, 2022
50e3193
Merge branch 'manylinux' of https://github.com/NVIDIA/TRTorch into ma…
narendasan Dec 7, 2022
3e787c7
Auditwheel
narendasan Dec 7, 2022
a7c17b7
refactor: auditwheel
narendasan Dec 7, 2022
5b64012
chore: put builds in right place
narendasan Dec 7, 2022
f68e93d
fix
narendasan Dec 7, 2022
3a49585
chore: more fixes for ci
narendasan Dec 7, 2022
eeb4e1c
chore: remove old build task
narendasan Dec 7, 2022
81f3f8e
fix
narendasan Dec 7, 2022
d67eb13
ci things
narendasan Dec 7, 2022
c8a8267
""
narendasan Dec 7, 2022
74f9506
""
narendasan Dec 7, 2022
96620d5
""
narendasan Dec 7, 2022
ac96016
Precise install
narendasan Dec 7, 2022
e3202e9
feat: Dont reship every .so
narendasan Dec 8, 2022
18dd56c
Merge branch 'manylinux' of https://github.com/NVIDIA/TRTorch into ma…
narendasan Dec 8, 2022
478d2a1
fix: address invalid classifier
narendasan Dec 9, 2022
a780c45
chore: better ignores
narendasan Dec 16, 2022
b567f3a
Ship libgomp
narendasan Jan 31, 2023
fabe47d
Dont need to ship libgomp, shipped with torch
narendasan Feb 13, 2023
fc56c3d
Pull in deps for testing
narendasan Feb 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 64 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ jobs:
at: /tmp/dist
- run:
name: "Install torch-tensorrt"
command: pip3 install /tmp/dist/x86_64-linux/*
command: pip3 install /tmp/dist/x86_64-linux/*cp39-cp39*.whl
- dump-test-env
- test-ts-core

Expand Down Expand Up @@ -710,7 +710,7 @@ jobs:
torch-build-index: << parameters.torch-build-index >>
- run:
name: "Install torch-tensorrt"
command: pip3 install --pre /tmp/dist/x86_64-linux/*
command: pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl
- dump-test-env
- test-ts-py-api

Expand Down Expand Up @@ -740,7 +740,7 @@ jobs:
command: export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH
- run:
name: "Install torch-tensorrt"
command: pip3 install --pre /tmp/dist/x86_64-linux/*
command: pip3 install --pre /tmp/dist/x86_64-linux/*cp39-cp39*.whl
# We install torch after torch-trt because pip automatically enforces the version constraint otherwise
- dump-test-env
- test-fx
Expand All @@ -754,9 +754,10 @@ jobs:
type: string
torch-build-index:
type: string
parallelism: 5
machine:
image: ubuntu-2004-cuda-11.4:202110-01
resource_class: xlarge
resource_class: gpu.nvidia.small
steps:
- when:
condition: << parameters.enabled >>
Expand All @@ -768,18 +769,58 @@ jobs:
cd ~/project/py/
docker build -t torch_tensorrt_release_env --build-arg trt_version=<< pipeline.parameters.trt-version-short >> -f ci/Dockerfile.ci .
- run:
name: Build Python packages and pre-cxx11-abi tarball
name: Build Python packages
command: |
cd ~/project/py/
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.rhel ~/project/WORKSPACE
docker run -it --rm -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash /workspace/project/py/ci/build_whl.sh
docker run -it --rm --gpus all -v ~/project:/workspace/project torch_tensorrt_release_env /bin/bash -c "source /workspace/project/py/ci/build_whl.sh && $(circleci tests split --total=5 ~/project/py/ci/build_manifest.txt)"
peri044 marked this conversation as resolved.
Show resolved Hide resolved
- run:
name: Collect packages
command: |
mkdir -p /tmp/dist/x86_64-linux
cp -r ~/project/py/wheelhouse/* /tmp/dist/x86_64-linux
- persist_to_workspace:
root: /tmp/dist
paths:
- x86_64-linux
- store_artifacts:
path: /tmp/dist/x86_64-linux
destination: x86_64-linux
- unless:
condition: << parameters.enabled >>
steps:
- run:
name: Skipped packaging
command: echo -e "Packaging stage not enabled"

# TODO: Merge this with above
package-x86_64-linux-cxx11-abi:
parameters:
enabled:
type: boolean
default: false
torch-build:
type: string
torch-build-index:
type: string
machine:
image: ubuntu-2004-cuda-11.4:202110-01
resource_class: xlarge
steps:
- when:
condition: << parameters.enabled >>
steps:
- checkout
- create-env:
os: "ubuntu2004"
platform: "x86_64"
cudnn-version: << pipeline.parameters.cudnn-version >>
trt-version-short: << pipeline.parameters.trt-version-short >>
bazel-version: << pipeline.parameters.bazel-version >>
bazel-platform: "x86_64"
- install-torch-from-index:
torch-build: << parameters.torch-build >>
torch-build-index: << parameters.torch-build-index >>
- run:
name: Build cxx11-abi tarball
command: |
Expand All @@ -788,13 +829,16 @@ jobs:
cp ~/project/toolchains/ci_workspaces/WORKSPACE.x86_64.release.ubuntu ~/project/WORKSPACE
bazel build //:libtorchtrt -c opt --noshow_progress
sudo chown -R $(whoami) ~/project/py
CUDA_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
TRT_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(cd ~/project/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
cd ~/project/py
CUDA_VERSION=$(python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(python3 -c "from versions import __version__;print(__version__)")
TRT_VERSION=$(python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
pip3 install --upgrade pip
pip3 install -r ~/project/py/requirements.txt
TORCH_VERSION=$(python3 -c "from torch import __version__;print(__version__.split('+')[0])")
mkdir -p ~/project/py/dist/
cp ~/project/bazel-bin/libtorchtrt.tar.gz ~/project/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
- run:
name: Collect packages
Expand Down Expand Up @@ -1076,7 +1120,13 @@ workflows:
when: << pipeline.parameters.enable-packaging >>
jobs:

- build-x86_64-linux:
- package-x86_64-linux:
enabled: << pipeline.parameters.enable-packaging >>
torch-build: << pipeline.parameters.torch-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>

- package-x86_64-linux-cxx11-abi:
enabled: << pipeline.parameters.enable-packaging >>
torch-build: << pipeline.parameters.torch-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>

Expand All @@ -1087,31 +1137,21 @@ workflows:
trt-version-long: << pipeline.parameters.trt-version-long >>
cudnn-version: << pipeline.parameters.cudnn-version >>
requires:
- build-x86_64-linux
- package-x86_64-linux

- test-py-ts-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
requires:
- build-x86_64-linux
- package-x86_64-linux

- test-py-fx-x86_64-linux:
torch-build: << pipeline.parameters.torch-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
trt-version-long: << pipeline.parameters.trt-version-long >>
requires:
- build-x86_64-linux


- package-x86_64-linux:
enabled: << pipeline.parameters.enable-packaging >>
torch-build: << pipeline.parameters.torch-build >>
torch-build-index: << pipeline.parameters.torch-build-index >>
#requires:
#- test-core-cpp-x86_64-linux
#- test-py-ts-x86_64-linux
#- test-py-fx-x86_64-linux
- package-x86_64-linux

on-push:
jobs:
Expand Down
5 changes: 5 additions & 0 deletions py/ci/build_manifest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
py37
py38
py39
py310
libtorchtrt_pre_cxx11_abi
131 changes: 88 additions & 43 deletions py/ci/build_whl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,66 @@

# Example usage: docker run -it -v$(pwd)/..:/workspace/TRTorch build_trtorch_wheel /bin/bash /workspace/TRTorch/py/build_whl.sh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace trtorch references here


cd /workspace/project/py

export CXX=g++
export CUDA_HOME=/usr/local/cuda-11.7
PROJECT_DIR=/workspace/project
export PROJECT_DIR=/workspace/project

cp -r $CUDA_HOME /usr/local/cuda

build_py37() {
/opt/python/cp37-cp37m/bin/python -m pip install --upgrade pip
/opt/python/cp37-cp37m/bin/python -m pip install -r requirements.txt
/opt/python/cp37-cp37m/bin/python setup.py bdist_wheel --release --ci
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp37-cp37m/lib/python3.7/site-packages/torch/lib:/opt/python/cp37-cp37m/lib/python3.7/site-packages/tensorrt/:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64/stubs /opt/python/cp37-cp37m/bin/python -m auditwheel repair --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-cp37-cp37m-linux_x86_64.whl
py37() {
cd /workspace/project/py
PY_BUILD_CODE=cp37-cp37m
PY_VERSION=3.7
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you let me know what is happening here with this soname_excludes ?

}

build_py38() {
/opt/python/cp38-cp38/bin/python -m pip install --upgrade pip
/opt/python/cp38-cp38/bin/python -m pip install -r requirements.txt
/opt/python/cp38-cp38/bin/python setup.py bdist_wheel --release --ci
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp38-cp38/lib/python3.8/site-packages/torch/lib:/opt/python/cp38-cp38/lib/python3.8/site-packages/tensorrt/:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64/stubs /opt/python/cp38-cp38/bin/python -m auditwheel repair --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-cp38-cp38-linux_x86_64.whl
py38() {
cd /workspace/project/py
PY_BUILD_CODE=cp38-cp38
PY_VERSION=3.8
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
}

build_py39() {
/opt/python/cp39-cp39/bin/python -m pip install --upgrade pip
/opt/python/cp39-cp39/bin/python -m pip install -r requirements.txt
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel --release --ci
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp39-cp39/lib/python3.8/site-packages/torch/lib:/opt/python/cp39-cp39/lib/python3.9/site-packages/tensorrt/:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64/stubs /opt/python/cp39-cp39/bin/python -m auditwheel repair --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-cp39-cp39-linux_x86_64.whl
py39() {
cd /workspace/project/py
PY_BUILD_CODE=cp39-cp39
PY_VERSION=3.9
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
}

build_py310() {
/opt/python/cp310-cp310/bin/python -m pip install --upgrade pip
/opt/python/cp310-cp310/bin/python -m pip install -r requirements.txt
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel --release --ci
#LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/python/cp310-cp310/lib/python3.8/site-packages/torch/lib:/opt/python/cp310-cp310/lib/python3.8/site-packages/tensorrt/:/usr/local/cuda-11.7/lib64:/usr/local/cuda-11.7/lib64/stubs /opt/python/cp38-cp38/bin/python -m auditwheel repair --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-cp310-cp310-linux_x86_64.whl
py310() {
cd /workspace/project/py
PY_BUILD_CODE=cp310-cp310
PY_VERSION=3.10
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
${PY_DIR}/bin/python setup.py bdist_wheel --release --ci
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${PY_PKG_DIR}/torch/lib:${PY_PKG_DIR}/tensorrt/:${CUDA_HOME}/lib64:${CUDA_HOME}/lib64/stubs ${PY_DIR}/bin/python -m auditwheel repair $(cat ${PROJECT_DIR}/py/ci/soname_excludes.params) --plat manylinux_2_17_x86_64 dist/torch_tensorrt-*-${PY_BUILD_CODE}-linux_x86_64.whl
}

#build_py311() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we remove this and add later ?

Expand All @@ -44,31 +70,50 @@ build_py310() {
# #auditwheel repair --plat manylinux_2_17_x86_64
#}

build_libtorchtrt() {
bazel clean
libtorchtrt() {
cd /workspace/project/py
mkdir -p /workspace/project/py/wheelhouse
PY_BUILD_CODE=cp310-cp310
PY_VERSION=3.10
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
bazel build //:libtorchtrt --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/dist/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)")
TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
peri044 marked this conversation as resolved.
Show resolved Hide resolved
}

build_libtorchtrt_pre_cxx11_abi() {
libtorchtrt_pre_cxx11_abi() {
cd /workspace/project/py
mkdir -p /workspace/project/py/wheelhouse
PY_BUILD_CODE=cp310-cp310
PY_VERSION=3.10
PY_NAME=python${PY_VERSION}
PY_DIR=/opt/python/${PY_BUILD_CODE}
PY_PKG_DIR=${PY_DIR}/lib/${PY_NAME}/site-packages/
${PY_DIR}/bin/python -m pip install --upgrade pip
${PY_DIR}/bin/python -m pip install -r requirements.txt
${PY_DIR}/bin/python -m pip install setuptools wheel auditwheel
bazel build //:libtorchtrt --config pre_cxx11_abi --platforms //toolchains:ci_rhel_x86_64_linux -c opt --noshow_progress
CUDA_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __version__;print(__version__)")
TRT_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py/torch_tensorrt && python3 -c "from _version import __cudnn_version__;print(__cudnn_version__)")
TORCH_VERSION=$(/opt/python/cp310-cp310/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/dist/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
CUDA_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cuda_version__;print(__cuda_version__)")
TORCHTRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __version__;print(__version__)")
TRT_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __tensorrt_version__;print(__tensorrt_version__)")
CUDNN_VERSION=$(cd ${PROJECT_DIR}/py && ${PY_DIR}/bin/python3 -c "from versions import __cudnn_version__;print(__cudnn_version__)")
TORCH_VERSION=$(${PY_DIR}/bin/python -c "from torch import __version__;print(__version__.split('+')[0])")
cp ${PROJECT_DIR}/bazel-bin/libtorchtrt.tar.gz ${PROJECT_DIR}/py/wheelhouse/libtorchtrt-${TORCHTRT_VERSION}-pre-cxx11-abi-cudnn${CUDNN_VERSION}-tensorrt${TRT_VERSION}-cuda${CUDA_VERSION}-libtorch${TORCH_VERSION}-x86_64-linux.tar.gz
}

build_py37
build_py38
build_py39
build_py310
#build_py37
#build_py38
#build_py39
#build_py310
#build_py311
build_libtorchtrt_pre_cxx11_abi
#build_libtorchtrt_pre_cxx11_abi
#build_libtorchtrt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be removed ?

28 changes: 28 additions & 0 deletions py/ci/soname_excludes.params
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
--exclude libc10_cuda.so
--exclude libc10.so
--exclude libcaffe2_nvrtc.so
--exclude libcublasLt.so
--exclude libcuda.so
--exclude libgomp.so
--exclude libnvrtc.so
--exclude libnvToolsExt.so
--exclude libshm.so
--exclude libtorch_cpu.so
--exclude libtorch_cuda_cpp.so
--exclude libtorch_cuda_cu.so
--exclude libtorch_cuda.so
--exclude libtorch_global_deps.so
--exclude libtorch_python.so
--exclude libtorch.so

--exclude libcudart.so.11
--exclude libnvrtc.so.11.2
--exclude libnvToolsExt-847d78f2.so.1
--exclude libnvinfer_plugin.so.8
--exclude libcublas.so.11
--exclude libcuda.so.515
--exclude libcublasLt.so.11
--exclude libnvinfer.so.8
--exclude libcudart-e409450e.so.11.0
--exclude libgomp-a34b3233.so.1
--exclude libcudnn.so.8
Loading