Skip to content

Commit ab8dfa1

Browse files
authored
use libtorch c++ distribution with c++11 strings in gpu image (#11346)
* use libtorch c++ distribution with c++11 strings in gpu image * libtorch path * don't activate libtorch before merging the image
1 parent 9273ea5 commit ab8dfa1

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

docker/Dockerfile.ci_gpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ RUN bash /install/ubuntu_install_darknet.sh
8585
COPY install/ubuntu_install_onnx.sh /install/ubuntu_install_onnx.sh
8686
RUN bash /install/ubuntu_install_onnx.sh
8787

88+
COPY install/ubuntu_install_libtorch.sh /install/ubuntu_install_libtorch.sh
89+
RUN bash /install/ubuntu_install_libtorch.sh
90+
8891
COPY install/ubuntu_install_tflite.sh /install/ubuntu_install_tflite.sh
8992
RUN bash /install/ubuntu_install_tflite.sh
9093

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
set -e
20+
set -u
21+
set -o pipefail
22+
23+
pushd /usr/local/
24+
wget -q https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip
25+
unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip
26+
# now it is in /usr/local/libtorch
27+
popd

0 commit comments

Comments
 (0)