提交 d36cb8f8 编写于 作者: S storypku 提交者: Chang Songhong

Docker: CUDA image with TensorRT to avoid CN build error

"Clearsigned file isn't valid, got 'NOSPLIT' (does the network require
authentication?)" when running "apt-get -y update"
上级 8145f9a5
......@@ -168,10 +168,15 @@ TAG=""
function determine_tag() {
local docker_fn="$(basename ${DOCKERFILE})"
local myid="${docker_fn%%.*}"
if [ "${myid}" = "tegra_cyber" ]; then
if [[ "${myid}" == "tegra_cyber" ]]; then
local cuda_ver="10.2"
local cudnn_ver="8"
TAG="${REPO}:L4T-${cuda_ver}-cudnn${cudnn_ver}-${UBT_LTS}-${TIME}"
elif [[ "${myid}" == "pre_cyber" ]]; then
local cuda_ver="10.2"
local cudnn_ver="7"
local trt_ver="7"
TAG="${REPO}:cuda${cuda_ver}-cudnn${cudnn_ver}-trt${trt_ver}-devel-${UBT_LTS}-${TARGET_ARCH}"
else
TAG="${REPO}:cyber-${TARGET_ARCH}-${UBT_LTS}-${TIME}"
fi
......
ARG BASE_IMAGE=nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
ARG BASE_IMAGE=apolloauto/apollo:cuda10.2-cudnn7-trt7-devel-18.04-x86_64
FROM ${BASE_IMAGE}
ARG BUILD_STAGE
......@@ -12,8 +12,8 @@ ENV PATH /opt/apollo/sysroot/bin:$PATH
COPY installers /tmp/installers
COPY rcfiles /opt/apollo/rcfiles
# Pre-downloaded tarballs
COPY archive /tmp/archive
# (Deprecated) Pre-downloaded tarballs
# COPY archive /tmp/archive
RUN bash /tmp/installers/install_minimal_environment.sh ${GEOLOC}
RUN bash /tmp/installers/install_cmake.sh
......
......@@ -27,13 +27,19 @@ apt_get_update_and_install \
libatlas-base-dev \
liblapack-dev
# TODO(storypku): GPU Build only
apt_get_update_and_install \
libcublas10 \
libcublas-dev
TARGET_ARCH="$(uname -m)"
# Note(storypku):
# 1) cublas disabled for x86 since already installed before this installer runs
if [[ "${TARGET_ARCH}" == "aarch64" ]]; then
apt_get_update_and_install \
libcublas10 \
libcublas-dev
info "Install TensorRT 7 ..."
bash ${CURR_DIR}/install_tensorrt.sh
info "Install TensorRT 7 ..."
bash ${CURR_DIR}/install_tensorrt.sh
fi
info "Install libtorch ..."
bash ${CURR_DIR}/install_libtorch.sh
......
ARG BASE_IMAGE=nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04
FROM ${BASE_IMAGE}
ENV TENSORRT_VERSION 7.0.0-1+cuda10.2
RUN apt-get -y update \
&& apt-get install -y --no-install-recommends \
libnvinfer7="${TENSORRT_VERSION}" \
libnvonnxparsers7="${TENSORRT_VERSION}" \
libnvparsers7="${TENSORRT_VERSION}" \
libnvinfer-plugin7="${TENSORRT_VERSION}" \
libnvinfer-dev="${TENSORRT_VERSION}" \
libnvonnxparsers-dev="${TENSORRT_VERSION}" \
libnvparsers-dev="${TENSORRT_VERSION}" \
libnvinfer-plugin-dev="${TENSORRT_VERSION}" \
&& find /usr/lib/x86_64-linux-gnu/ -type f \
\( -name "libnv*_static.a" -or -name "libmyelin_*_static.a" \) \
-delete -print \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /etc/apt/sources.list.d/nvidia-ml.list \
&& rm -f /etc/apt/sources.list.d/cuda.list
# NVIDIA apt sources.list removed to speed up build
# Remove static TensorRT libraries
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册