onnxruntime/tools/ci_build/github/linux/docker/scripts/install_ubuntu.sh
stevenlix 544e53e24e Update TensorRT to version 6.0.1.5 (#1966)
* remove onnx-tensorrt submodule

* add new onnx-tensorrt submodule (experiment) for trt6

* update engine build for trt6

* update compile and compute for tensorrt6.0

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* Update tensorrt_execution_provider.cc

* switch to onnx-tensorrt master for TensorRT6'

* Update tensorrt_execution_provider.cc

* Handle dynamic batch size and add memcpy in TensorRT EP

* update test cases

* Update tensorrt_execution_provider.cc

* update onnx-tensorrt submodule

* Update Dockerfile.ubuntu_tensorrt

* Update Dockerfile.ubuntu_tensorrt

* Update run_dockerbuild.sh

* Update run_dockerbuild.sh

* Update install_ubuntu.sh

* Update concat_op_test.cc

* Update tensorrt_execution_provider.cc

* Upgrade TensorRT to version 6.0.1.5

* Update onnxruntime_providers.cmake

* Update CMakeLists.txt

* Update reduction_ops_test.cc

* Update install_ubuntu.sh

* Update Dockerfile.ubuntu_tensorrt

* Update Dockerfile.tensorrt

* Update BUILD.md

* Update run_dockerbuild.sh

* Update install_ubuntu.sh

* Update onnxruntime_providers.cmake

* Update install_ubuntu.sh

* Update install_ubuntu.sh

* Update gemm_test.cc

* Update gather_op_test.cc

* Update CMakeLists.txt

* Removed submodule

* update onnx-tensorrt submodule

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Add Ubuntu18.04 build option

* Remove redundency

* Fix issue that it does not add memcopy node correctly if some nodes fall back to CUDA EP.
e.g. after partition, there's TRT_Node -> Cuda_node (with CPU memory expected), we still need to add memcpy node between them.

* update for Trt Windows build

* Update onnxruntime_providers.cmake

* Disable opset11 tests on TensorRT

* Update pad_test.cc

* Update build.py

* update scripts for ubuntu18.04

* Disable warning for Windows build
2019-10-06 10:40:53 -07:00

147 lines
4.7 KiB
Bash
Executable file

#!/bin/bash
set -e
while getopts p:d:o: parameter_Option
do case "${parameter_Option}"
in
p) PYTHON_VER=${OPTARG};;
d) DEVICE_TYPE=${OPTARG};;
o) OS_VERSION=${OPTARG};;
esac
done
PYTHON_VER=${PYTHON_VER:=3.5}
# Some Edge devices only have limited disk space, use this option to exclude some package
DEVICE_TYPE=${DEVICE_TYPE:=Normal}
OS_VERSION=${OS_VERSION:=16.04}
DEBIAN_FRONTEND=noninteractive
SYS_LONG_BIT=$(getconf LONG_BIT)
apt-get update && apt-get install -y software-properties-common
add-apt-repository ppa:deadsnakes/ppa
if [ $OS_VERSION = "16.04" ]; then
PACKAGE_LIST="autotools-dev \
automake \
build-essential \
git apt-transport-https apt-utils \
ca-certificates \
pkg-config \
wget \
zlib1g \
zlib1g-dev \
libssl-dev \
curl libcurl4-openssl-dev \
autoconf \
sudo \
gfortran \
python3-dev \
language-pack-en \
libopenblas-dev \
liblttng-ust0 \
libcurl3 \
libssl1.0.0 \
libkrb5-3 \
libicu55 \
libtinfo-dev \
libtool \
aria2 \
bzip2 \
unzip \
zip \
rsync libunwind8 libpng16-dev libexpat1-dev \
python3-setuptools python3-numpy python3-wheel python python3-pip python3-pytest \
libprotobuf-dev libprotobuf9v5 protobuf-compiler"
else # ubuntu18.04
add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
PACKAGE_LIST="autotools-dev \
automake \
build-essential \
git apt-transport-https apt-utils \
ca-certificates \
pkg-config \
wget \
zlib1g \
zlib1g-dev \
libssl-dev \
curl libcurl4-openssl-dev \
autoconf \
sudo \
gfortran \
python3-dev \
language-pack-en \
libopenblas-dev \
liblttng-ust0 \
libcurl4 \
libssl1.0.0 \
libkrb5-3 \
libicu55 \
libtinfo-dev \
libtool \
aria2 \
bzip2 \
unzip \
zip \
rsync libunwind8 libpng-dev libexpat1-dev \
python3-setuptools python3-numpy python3-wheel python python3-pip python3-pytest \
libprotobuf-dev libprotobuf10 protobuf-compiler"
fi
if [ $DEVICE_TYPE = "Normal" ]; then
PACKAGE_LIST="$PACKAGE_LIST libedit-dev libxml2-dev python3-packaging"
fi
apt-get update && apt-get install -y --no-install-recommends $PACKAGE_LIST
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
echo "Installing dotnet-sdk"
if [ $SYS_LONG_BIT = "64" ]; then
OS_VER=`lsb_release -r -s`
mkdir -p /tmp/dotnet
aria2c -q -d /tmp/dotnet https://packages.microsoft.com/config/ubuntu/${OS_VER}/packages-microsoft-prod.deb
dpkg -i /tmp/dotnet/packages-microsoft-prod.deb
apt-get update
apt-get install -y dotnet-sdk-2.2
rm -rf /tmp/dotnet
fi
if [ $OS_VERSION = "16.04" ]; then
if [ $PYTHON_VER != "3.5" ]; then
apt-get install -y --no-install-recommends \
python${PYTHON_VER} \
python${PYTHON_VER}-dev
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VER} 1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 2
update-alternatives --set python3 /usr/bin/python${PYTHON_VER}
#TODO: the old one(/usr/bin/pip3) should be uninstalled first. Because the one will be
#put at /usr/local/. Then there will be two pips.
/usr/bin/python${PYTHON_VER} -m pip install --upgrade --force-reinstall pip==19.0.3
fi
rm -rf /var/lib/apt/lists/*
if [ $DEVICE_TYPE = "Normal" ]; then
aria2c -q -d /tmp -o llvm.tar.xz http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz
tar --strip 1 -Jxf /tmp/llvm.tar.xz -C /usr
fi
else # ubuntu18.04
if [ $PYTHON_VER != "3.6" ]; then
apt-get install -y --no-install-recommends \
python${PYTHON_VER} \
python${PYTHON_VER}-dev
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VER} 1
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
update-alternatives --set python3 /usr/bin/python${PYTHON_VER}
#TODO: the old one(/usr/bin/pip3) should be uninstalled first. Because the one will be
#put at /usr/local/. Then there will be two pips.
/usr/bin/python${PYTHON_VER} -m pip install --upgrade --force-reinstall pip==19.0.3
fi
rm -rf /var/lib/apt/lists/*
if [ $DEVICE_TYPE = "Normal" ]; then
aria2c -q -d /tmp -o llvm.tar.xz http://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz
tar --strip 1 -Jxf /tmp/llvm.tar.xz -C /usr
fi
fi