onnxruntime/tools/ci_build/github/linux/docker/scripts/install-protobuf.sh
Changming Sun 7b4ce0c1e1
Delete the build scripts that were copied from manylinux project (#12358)
1. Delete the build scripts that were copied from manylinux project. Use "git checkout" instead.
2. Update manylinux version to get python 3.11. Related issue: Python 3.11 support #12343
3. Change the cuda version of linux gpu build job of nuget packaging pipeline from cuda 11.4 to cuda 11.6 to match the TRT job within the same pipeline.. (A lot other places need be updated as well, but I'd prefer to put them in another PR)
4. Make dockerfile names static. For example, replace tools/ci_build/github/linux/docker/$(DockerFile) to tools/ci_build/github/linux/docker/Dockerfile.manylinux2014_cpu . The former one relies on a runtime variable $(DockerFile), Template Parameters are expanded early in processing a pipeline run when most variables are not available. It like C++ macros vs variables.
2022-07-29 18:24:19 -07:00

35 lines
800 B
Bash
Executable file

#!/bin/bash
# Top-level build script called from Dockerfile
# Stop at any error, show all commands
set -exuo pipefail
# Get script directory
MY_DIR=$(dirname "${BASH_SOURCE[0]}")
# Get build utilities
source $MY_DIR/build_utils.sh
# Install newest libtool
check_var ${PROTOBUF_ROOT}
check_var ${PROTOBUF_HASH}
check_var ${PROTOBUF_DOWNLOAD_URL}
fetch_source ${PROTOBUF_ROOT}.tar.gz ${PROTOBUF_DOWNLOAD_URL}
check_sha256sum ${PROTOBUF_ROOT}.tar.gz ${PROTOBUF_HASH}
tar -zxf ${PROTOBUF_ROOT}.tar.gz
pushd protobuf-${PROTOBUF_VERSION}
DESTDIR=/manylinux-rootfs do_standard_install
popd
rm -rf ${PROTOBUF_ROOT} ${PROTOBUF_ROOT}.tar.gz
# Strip what we can
strip_ /manylinux-rootfs
# Install
cp -rlf /manylinux-rootfs/* /
# Remove temporary rootfs
rm -rf /manylinux-rootfs
hash -r
protoc --version