File tree Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Expand file tree Collapse file tree 2 files changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,6 @@ RUN ln -s /usr/bin/python3.8 /usr/bin/python
12
12
RUN python get-pip.py
13
13
RUN pip3 install wheel
14
14
15
- # Install Pytorch
16
- RUN pip3 install torch==2.0.0.dev20230103+cu117 torchvision==0.15.0.dev20230103+cu117 --extra-index-url https://download.pytorch.org/whl/nightly/cu117
17
-
18
15
# Install CUDNN + TensorRT
19
16
RUN wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
20
17
RUN mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
@@ -64,6 +61,7 @@ COPY . /opt/torch_tensorrt
64
61
COPY --from=torch-tensorrt-builder /workspace/torch_tensorrt/src/py/dist/ .
65
62
66
63
RUN cp /opt/torch_tensorrt/docker/WORKSPACE.docker /opt/torch_tensorrt/WORKSPACE
64
+ RUN pip install -r /opt/torch_tensorrt/py/requirements.txt
67
65
RUN pip3 install *.whl && rm -fr /workspace/torch_tensorrt/py/dist/* *.whl
68
66
69
67
# Install native tensorrt python package required by torch_tensorrt whl file
Original file line number Diff line number Diff line change @@ -48,20 +48,16 @@ new_local_repository(
48
48
# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs)
49
49
#############################################################################################################
50
50
51
- http_archive (
51
+ new_local_repository (
52
52
name = "libtorch",
53
- build_file = "@//third_party/libtorch:BUILD",
54
- sha256 = "59b8b5e1954a86d50b79c13f06398d385b200da13e37a08ecf31d3c62e5ca127",
55
- strip_prefix = "libtorch",
56
- urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-cxx11-abi-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"],
53
+ path = "/usr/local/lib/python3.8/dist-packages/torch/",
54
+ build_file = "third_party/libtorch/BUILD"
57
55
)
58
56
59
- http_archive (
57
+ new_local_repository (
60
58
name = "libtorch_pre_cxx11_abi",
61
- build_file = "@//third_party/libtorch:BUILD",
62
- sha256 = "e260fc7476be89d1650953e8643e9f7363845f5a52de4bab87ac0e619c1f6ad4",
63
- strip_prefix = "libtorch",
64
- urls = ["https://download.pytorch.org/libtorch/nightly/cu117/libtorch-shared-with-deps-2.0.0.dev20230103%2Bcu117.zip"],
59
+ path = "/usr/local/lib/python3.8/dist-packages/torch/",
60
+ build_file = "third_party/libtorch/BUILD"
65
61
)
66
62
67
63
####################################################################################
You can’t perform that action at this time.
0 commit comments