-
Notifications
You must be signed in to change notification settings - Fork 363
Fix docker build issue #3070
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
Merged
Merged
Fix docker build issue #3070
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
054ef80
Fix docker build issue
lanluo-nvidia 9fc585e
test only
lanluo-nvidia 9557bfe
test
lanluo-nvidia d478ec6
test
lanluo-nvidia adaf1e8
test
lanluo-nvidia 0e2f646
test
lanluo-nvidia 92508c5
test
lanluo-nvidia c8f4cf6
test
lanluo-nvidia c825317
test
lanluo-nvidia 055c20b
test
lanluo-nvidia eee9c11
Merge branch 'main' into lluo/fix_docker_build_issue
lanluo-nvidia b0092ca
Merge branch 'main' into lluo/fix_docker_build_issue
lanluo-nvidia f7cd24e
test
lanluo-nvidia 0831f65
bump torchvision
lanluo-nvidia bb5b0c5
test
lanluo-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
module( | ||
name = "torch_tensorrt", | ||
repo_name = "org_pytorch_tensorrt", | ||
version = "${BUILD_VERSION}" | ||
) | ||
|
||
bazel_dep(name = "googletest", version = "1.14.0") | ||
bazel_dep(name = "platforms", version = "0.0.10") | ||
bazel_dep(name = "rules_cc", version = "0.0.9") | ||
bazel_dep(name = "rules_python", version = "0.34.0") | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
python.toolchain( | ||
ignore_root_user_error = True, | ||
python_version = "3.11", | ||
) | ||
|
||
bazel_dep(name = "rules_pkg", version = "1.0.1") | ||
git_override( | ||
module_name = "rules_pkg", | ||
commit = "17c57f4", | ||
remote = "https://github.com/narendasan/rules_pkg", | ||
) | ||
|
||
local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "local_repository") | ||
|
||
|
||
new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") | ||
|
||
# CUDA should be installed on the system locally | ||
new_local_repository( | ||
name = "cuda", | ||
build_file = "@//third_party/cuda:BUILD", | ||
path = "/usr/local/cuda", | ||
) | ||
|
||
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
#################################################################################### | ||
# Locally installed dependencies (use in cases of custom dependencies or aarch64) | ||
#################################################################################### | ||
|
||
# NOTE: In the case you are using just the pre-cxx11-abi path or just the cxx11 abi path | ||
# with your local libtorch, just point deps at the same path to satisfy bazel. | ||
|
||
# NOTE: NVIDIA's aarch64 PyTorch (python) wheel file uses the CXX11 ABI unlike PyTorch's standard | ||
# x86_64 python distribution. If using NVIDIA's version just point to the root of the package | ||
# for both versions here and do not use --config=pre-cxx11-abi | ||
|
||
new_local_repository( | ||
name = "libtorch", | ||
path = "/opt/python3/site-packages/torch/", | ||
build_file = "third_party/libtorch/BUILD" | ||
) | ||
|
||
new_local_repository( | ||
name = "libtorch_pre_cxx11_abi", | ||
path = "/opt/python3/site-packages/torch/", | ||
build_file = "third_party/libtorch/BUILD" | ||
) | ||
|
||
new_local_repository( | ||
name = "tensorrt", | ||
path = "/usr/", | ||
build_file = "@//third_party/tensorrt/local:BUILD" | ||
) | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") | ||
|
||
pip.parse( | ||
download_only = True, | ||
hub_name = "pypi", | ||
python_version = ${PYTHON_VERSION}, | ||
requirements_lock = "//:requirements_dev.txt", | ||
) | ||
|
||
use_repo(pip, "pypi") |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
|
||
TOP_DIR=$(cd $(dirname $0); pwd)/.. | ||
|
||
if [[ -z "${USE_CXX11}" ]]; then | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.