Delete Dockerfile.ubuntu_for_android (#8848)

This commit is contained in:
Changming Sun 2021-08-25 22:25:14 -07:00 committed by GitHub
parent b21ea00020
commit 9cd7d836f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 71 deletions

View file

@ -1,7 +1,6 @@
ARG OS_VERSION=18.04
FROM ubuntu:${OS_VERSION}
FROM ubuntu:20.04
ARG PYTHON_VERSION=3.6
ARG PYTHON_VERSION=3.8
ADD scripts /tmp/scripts
RUN /tmp/scripts/install_ubuntu.sh -p $PYTHON_VERSION && /tmp/scripts/install_os_deps.sh && /tmp/scripts/install_python_deps.sh -p $PYTHON_VERSION && rm -rf /tmp/scripts

View file

@ -1,14 +0,0 @@
ARG OS_VERSION=20.04
FROM ubuntu:${OS_VERSION}
ARG PYTHON_VERSION=3.8
ADD scripts /tmp/scripts
RUN /tmp/scripts/install_ubuntu.sh -p $PYTHON_VERSION && /tmp/scripts/install_deps_android.sh && /tmp/scripts/install_protobuf.sh && rm -rf /tmp/scripts
WORKDIR /root
ARG BUILD_UID=1000
ARG BUILD_USER=onnxruntimedev
RUN adduser --gecos 'onnxruntime Build User' --disabled-password $BUILD_USER --uid $BUILD_UID
WORKDIR /home/$BUILD_USER
USER $BUILD_USER

View file

@ -1,13 +1,11 @@
ARG OS_VERSION=18.04
FROM ubuntu:${OS_VERSION}
FROM ubuntu:20.04
ARG PYTHON_VERSION=3.5
ARG OPENVINO_VERSION=2021.4
ADD scripts /tmp/scripts
RUN /tmp/scripts/install_ubuntu.sh -p $PYTHON_VERSION -d EdgeDevice && \
RUN /tmp/scripts/install_ubuntu.sh -p 3.8 -d EdgeDevice && \
/tmp/scripts/install_os_deps.sh -d EdgeDevice && \
/tmp/scripts/install_python_deps.sh -p $PYTHON_VERSION -d EdgeDevice
/tmp/scripts/install_python_deps.sh -p 3.8 -d EdgeDevice
RUN apt update && apt install -y libnuma1 ocl-icd-libopencl1 && \
rm -rf /var/lib/apt/lists/* /tmp/scripts

View file

@ -1,11 +0,0 @@
#!/bin/bash
set -e
python3 -m pip install cmake==3.21.0
cmake --version
# Download Android NDK r20, move /temp_ndk/android-ndk-<version> to /android_ndk
wget -qO- -O temp.zip https://dl.google.com/android/repository/android-ndk-r20-linux-x86_64.zip && unzip -oq temp.zip -d /temp-ndk && mv /temp-ndk/* /android-ndk && rm temp.zip && rm -rf /temp-ndk && ls /android-ndk
apt-get -y remove libprotobuf-dev protobuf-compiler

View file

@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# This file is used by Linux Multi GPU TensorRT CI Pipeline,Linux Nuphar CI Pipeline,Linux OpenVINO CI Pipeline,orttraining-linux-gpu-ci-pipeline
set -e -o -x
id
@ -19,16 +23,7 @@ done
export PATH=$PATH:/usr/local/gradle/bin
if [ $BUILD_OS = "android" ]; then
pushd /onnxruntime_src
mkdir build-android && cd build-android
if [ $BUILD_DEVICE = "nnapi" ]; then
cmake -DCMAKE_TOOLCHAIN_FILE=/android-ndk/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc -Donnxruntime_USE_NNAPI_BUILTIN=ON ../cmake
else
cmake -DCMAKE_TOOLCHAIN_FILE=/android-ndk/build/cmake/android.toolchain.cmake -DANDROID_ABI=arm64-v8a -DONNX_CUSTOM_PROTOC_EXECUTABLE=/usr/bin/protoc ../cmake
fi
make -j$(nproc)
elif [ $BUILD_OS = "yocto" ]; then
if [ $BUILD_OS = "yocto" ]; then
YOCTO_FOLDER="4.19-warrior"
if [ $YOCTO_VERSION = "4.14" ]; then
YOCTO_FOLDER="4.14-sumo"

View file

@ -1,4 +1,8 @@
#!/bin/bash
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# This file is used by Linux Multi GPU TensorRT CI Pipeline,Linux Nuphar CI Pipeline,Linux OpenVINO CI Pipeline,orttraining-linux-gpu-ci-pipeline
#This file is only for Linux pipelines that build on ubuntu. All the docker images here are based on ubuntu.
#Please don't put CentOS or manylinux2014 related stuffs here.
set -e -o -x
@ -21,9 +25,9 @@ echo "ALLOW_RELEASED_ONNX_OPSET_ONLY environment variable is set as "$ALLOW_RELE
while getopts o:d:p:x:v:y:t:i:mue parameter_Option
do case "${parameter_Option}"
in
#android, yocto, ubuntu20.04
#yocto, ubuntu20.04
o) BUILD_OS=${OPTARG};;
#gpu, tensorrt or openvino. It is ignored when BUILD_OS is android or yocto.
#gpu, tensorrt or openvino. It is ignored when BUILD_OS is yocto.
d) BUILD_DEVICE=${OPTARG};;
#python version: 3.6 3.7 (absence means default 3.6)
p) PYTHON_VER=${OPTARG};;
@ -48,13 +52,7 @@ esac
done
EXIT_CODE=1
if [ $BUILD_OS = "ubuntu18.04" ]; then
DEFAULT_PYTHON_VER="3.6"
elif [ $BUILD_OS = "ubuntu20.04" ]; then
DEFAULT_PYTHON_VER="3.8"
else
DEFAULT_PYTHON_VER="3.6"
fi
DEFAULT_PYTHON_VER="3.8"
PYTHON_VER=${PYTHON_VER:=$DEFAULT_PYTHON_VER}
echo "bo=$BUILD_OS bd=$BUILD_DEVICE bdir=$BUILD_DIR pv=$PYTHON_VER bex=$BUILD_EXTR_PAR"
@ -68,13 +66,7 @@ DOCKER_CMD="docker"
NEED_BUILD_SHARED_LIB=true
cd $SCRIPT_DIR/docker
if [ $BUILD_OS = "android" ]; then
IMAGE="android"
DOCKER_FILE=Dockerfile.ubuntu_for_android
$GET_DOCKER_IMAGE_CMD --repository "onnxruntime-$IMAGE" \
--docker-build-args="--build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg PYTHON_VERSION=${PYTHON_VER}" \
--dockerfile $DOCKER_FILE --context .
elif [ $BUILD_OS = "yocto" ]; then
if [ $BUILD_OS = "yocto" ]; then
IMAGE="arm-yocto-$YOCTO_VERSION"
DOCKER_FILE=Dockerfile.ubuntu_for_arm
# ACL 19.05 need yocto 4.19
@ -116,17 +108,7 @@ elif [[ $BUILD_DEVICE = "tensorrt"* ]]; then
--docker-build-args="--build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg PYTHON_VERSION=${PYTHON_VER}" \
--dockerfile $DOCKER_FILE --context .
else
IMAGE_OS_VERSION=""
if [ $BUILD_OS = "ubuntu18.04" ]; then
IMAGE_OS_VERSION="18.04"
PYTHON_VER="3.6"
elif [ $BUILD_OS = "ubuntu20.04" ]; then
IMAGE_OS_VERSION="20.04"
PYTHON_VER="3.8"
else
exit 1
fi
BUILD_ARGS="--build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg PYTHON_VERSION=${PYTHON_VER} --build-arg OS_VERSION=${IMAGE_OS_VERSION}"
BUILD_ARGS="--build-arg BUILD_USER=onnxruntimedev --build-arg BUILD_UID=$(id -u) --build-arg PYTHON_VERSION=3.8"
if [ $BUILD_DEVICE = "openvino" ]; then
IMAGE="$BUILD_OS-openvino"
@ -156,7 +138,7 @@ if [ -z "$NIGHTLY_BUILD" ]; then
set NIGHTLY_BUILD=0
fi
if [ $BUILD_DEVICE = "cpu" ] || [ $BUILD_DEVICE = "openvino" ] || [ $BUILD_DEVICE = "nnapi" ] || [ $BUILD_DEVICE = "arm" ]; then
if [ $BUILD_DEVICE = "cpu" ] || [ $BUILD_DEVICE = "openvino" ] || [ $BUILD_DEVICE = "arm" ]; then
RUNTIME=
else
RUNTIME="--gpus all"