mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
parent
51ed27cf22
commit
bbace23d0c
11 changed files with 352 additions and 15 deletions
1
setup.py
1
setup.py
|
|
@ -97,6 +97,7 @@ manylinux_tags = [
|
|||
"manylinux2014_ppc64",
|
||||
"manylinux2014_ppc64le",
|
||||
"manylinux2014_s390x",
|
||||
"manylinux_2_27_x86_64",
|
||||
]
|
||||
is_manylinux = environ.get("AUDITWHEEL_PLAT", None) in manylinux_tags
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,11 @@ parameters:
|
|||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: enable_ubuntu_cpu
|
||||
displayName: 'Whether Ubuntu CPU (manylinux_2_27) package is built.'
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: enable_linux_gpu
|
||||
displayName: 'Whether Linux GPU package is built.'
|
||||
type: boolean
|
||||
|
|
@ -40,6 +45,7 @@ stages:
|
|||
- template: templates/py-packaging-stage.yml
|
||||
parameters:
|
||||
enable_linux_gpu: ${{ parameters.enable_linux_gpu }}
|
||||
enable_ubuntu_cpu: ${{ parameters.enable_ubuntu_cpu }}
|
||||
enable_linux_cpu: ${{ parameters.enable_linux_cpu }}
|
||||
enable_windows_cpu: ${{ parameters.enable_windows_cpu }}
|
||||
enable_windows_gpu: ${{ parameters.enable_windows_gpu }}
|
||||
|
|
|
|||
|
|
@ -10,6 +10,11 @@ parameters:
|
|||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: enable_ubuntu_cpu
|
||||
displayName: 'Whether Ubuntu CPU (manylinux_2_27) package is built.'
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: enable_linux_gpu
|
||||
displayName: 'Whether Linux GPU package is built.'
|
||||
type: boolean
|
||||
|
|
@ -54,6 +59,114 @@ stages:
|
|||
- stage: Python_Packaging
|
||||
|
||||
jobs:
|
||||
- ${{ if eq(parameters.enable_ubuntu_cpu, true) }}:
|
||||
- job: Linux_Ubuntu_CPU_py_Wheels
|
||||
timeoutInMinutes: 90
|
||||
workspace:
|
||||
clean: all
|
||||
pool: Linux-CPU
|
||||
strategy:
|
||||
matrix:
|
||||
Python37:
|
||||
PythonVersion: '3.7'
|
||||
Python38:
|
||||
PythonVersion: '3.8'
|
||||
Python39:
|
||||
PythonVersion: '3.9'
|
||||
Python310:
|
||||
PythonVersion: '3.10'
|
||||
variables:
|
||||
- name: cachedimage
|
||||
value: onnxruntimecpu227build
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- template: set-python-manylinux-variables-step.yml
|
||||
|
||||
- template: get-docker-image-steps.yml
|
||||
parameters:
|
||||
Dockerfile: tools/ci_build/github/linux/docker/Dockerfile.manylinux_2_27_cpu
|
||||
Context: tools/ci_build/github/linux/docker
|
||||
DockerBuildArgs: "--build-arg BUILD_UID=$( id -u )"
|
||||
Repository: ${{ variables.cachedimage }}
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Build Python Wheel'
|
||||
inputs:
|
||||
script: |
|
||||
mkdir -p $HOME/.onnx
|
||||
docker run --rm \
|
||||
--volume /data/onnx:/data/onnx:ro \
|
||||
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
||||
--volume $(Build.BinariesDirectory):/build \
|
||||
--volume /data/models:/build/models:ro \
|
||||
--volume $HOME/.onnx:/home/onnxruntimedev/.onnx \
|
||||
-e NIGHTLY_BUILD \
|
||||
-e BUILD_BUILDNUMBER \
|
||||
${{ variables.cachedimage }} \
|
||||
$(PythonManylinuxDir)/bin/python3 /onnxruntime_src/tools/ci_build/build.py \
|
||||
--build_dir /build --cmake_generator Ninja \
|
||||
--config Release --update --build \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--enable_lto \
|
||||
--build_wheel \
|
||||
--enable_onnx_tests \
|
||||
${{ parameters.build_py_parameters }}
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Running tests'
|
||||
condition: and(succeeded(), eq(variables['PythonVersion'], '3.8'))
|
||||
inputs:
|
||||
script: |
|
||||
set -e -x
|
||||
rm -rf $(Build.BinariesDirectory)/Release/onnxruntime $(Build.BinariesDirectory)/Release/pybind11
|
||||
sudo rm -f /build /onnxruntime_src
|
||||
sudo ln -s $(Build.SourcesDirectory) /onnxruntime_src
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip uninstall -y ort-nightly-gpu ort-nightly onnxruntime onnxruntime-gpu onnxruntime-training onnxruntime-directml ort-nightly-directml -qq
|
||||
cp $(Build.SourcesDirectory)/tools/ci_build/github/linux/docker/scripts/manylinux/requirements.txt $(Build.BinariesDirectory)/requirements.txt
|
||||
# Test ORT with the latest ONNX release.
|
||||
export ONNX_VERSION=$(cat $(Build.SourcesDirectory)/cmake/external/onnx/VERSION_NUMBER)
|
||||
sed -i "s/git+http:\/\/github\.com\/onnx\/onnx.*/onnx==$ONNX_VERSION/" $(Build.BinariesDirectory)/requirements.txt
|
||||
python3 -m pip install -r $(Build.BinariesDirectory)/requirements.txt
|
||||
python3 -m pip install $(Build.BinariesDirectory)/Release/dist/*.whl
|
||||
cd $(Build.BinariesDirectory)/Release
|
||||
ls $(Build.BinariesDirectory)/models
|
||||
rmdir $(Build.BinariesDirectory)/models
|
||||
ln -sf /data/models $(Build.BinariesDirectory)
|
||||
python3 $(Build.SourcesDirectory)/tools/ci_build/build.py \
|
||||
--build_dir $(Build.BinariesDirectory) --cmake_generator Ninja \
|
||||
--config Release --test \
|
||||
--skip_submodule_sync \
|
||||
--parallel \
|
||||
--enable_lto \
|
||||
--build_wheel \
|
||||
--enable_onnx_tests \
|
||||
${{ parameters.build_py_parameters }} \
|
||||
--ctest_path ''
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy Python Wheel to: $(Build.ArtifactStagingDirectory)'
|
||||
inputs:
|
||||
SourceFolder: '$(Build.BinariesDirectory)'
|
||||
Contents: 'Release/dist/*.whl'
|
||||
TargetFolder: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: 'Publish Artifact: ONNXRuntime python wheel and documentation'
|
||||
inputs:
|
||||
ArtifactName: onnxruntime
|
||||
|
||||
- template: component-governance-component-detection-steps.yml
|
||||
parameters:
|
||||
condition: 'succeeded'
|
||||
|
||||
- template: clean-agent-build-directory-step.yml
|
||||
|
||||
- ${{ if eq(parameters.enable_linux_cpu, true) }}:
|
||||
- job: Linux_CPU_py_Wheels
|
||||
timeoutInMinutes: 90
|
||||
|
|
|
|||
189
tools/ci_build/github/linux/docker/Dockerfile.manylinux_2_27_cpu
Normal file
189
tools/ci_build/github/linux/docker/Dockerfile.manylinux_2_27_cpu
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
ARG BASEIMAGE=ubuntu:18.04
|
||||
ARG POLICY=manylinux_2_27
|
||||
ARG PLATFORM=x86_64
|
||||
ARG DEVTOOLSET_ROOTPATH=
|
||||
ARG LD_LIBRARY_PATH_ARG=
|
||||
ARG PREPEND_PATH=
|
||||
|
||||
|
||||
#Build manylinux2014 docker image begin
|
||||
FROM $BASEIMAGE AS runtime_base
|
||||
ARG POLICY
|
||||
ARG PLATFORM
|
||||
ARG DEVTOOLSET_ROOTPATH
|
||||
ARG LD_LIBRARY_PATH_ARG
|
||||
ARG PREPEND_PATH
|
||||
LABEL maintainer="The ManyLinux project"
|
||||
|
||||
ENV AUDITWHEEL_POLICY=${POLICY} AUDITWHEEL_ARCH=${PLATFORM} AUDITWHEEL_PLAT=${POLICY}_${PLATFORM}
|
||||
ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8
|
||||
ENV DEVTOOLSET_ROOTPATH=${DEVTOOLSET_ROOTPATH}
|
||||
ENV LD_LIBRARY_PATH=${LD_LIBRARY_PATH_ARG}
|
||||
ENV PATH=${PREPEND_PATH}${PATH}
|
||||
ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
|
||||
|
||||
# first copy the fixup mirrors script, keep the script around
|
||||
COPY build_scripts/fixup-mirrors.sh /usr/local/sbin/fixup-mirrors
|
||||
|
||||
# setup entrypoint, this will wrap commands with `linux32` with i686 images
|
||||
COPY build_scripts/install-entrypoint.sh \
|
||||
build_scripts/update-system-packages.sh \
|
||||
build_scripts/build_utils.sh \
|
||||
/build_scripts/
|
||||
|
||||
RUN /build_scripts/install-entrypoint.sh && rm -rf /build_scripts
|
||||
COPY manylinux-entrypoint /usr/local/bin/manylinux-entrypoint
|
||||
ENTRYPOINT ["manylinux-entrypoint"]
|
||||
|
||||
COPY build_scripts/install-runtime-packages.sh \
|
||||
build_scripts/update-system-packages.sh \
|
||||
build_scripts/build_utils.sh \
|
||||
/build_scripts/
|
||||
RUN manylinux-entrypoint /build_scripts/install-runtime-packages.sh && rm -rf /build_scripts/
|
||||
|
||||
COPY build_scripts/build_utils.sh /build_scripts/
|
||||
|
||||
COPY build_scripts/install-autoconf.sh /build_scripts/
|
||||
RUN export AUTOCONF_ROOT=autoconf-2.71 && \
|
||||
export AUTOCONF_HASH=431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c && \
|
||||
export AUTOCONF_DOWNLOAD_URL=http://ftp.gnu.org/gnu/autoconf && \
|
||||
manylinux-entrypoint /build_scripts/install-autoconf.sh
|
||||
|
||||
COPY build_scripts/install-automake.sh /build_scripts/
|
||||
RUN export AUTOMAKE_ROOT=automake-1.16.5 && \
|
||||
export AUTOMAKE_HASH=07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605 && \
|
||||
export AUTOMAKE_DOWNLOAD_URL=http://ftp.gnu.org/gnu/automake && \
|
||||
manylinux-entrypoint /build_scripts/install-automake.sh
|
||||
|
||||
COPY build_scripts/install-libtool.sh /build_scripts/
|
||||
RUN export LIBTOOL_ROOT=libtool-2.4.6 && \
|
||||
export LIBTOOL_HASH=e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3 && \
|
||||
export LIBTOOL_DOWNLOAD_URL=http://ftp.gnu.org/gnu/libtool && \
|
||||
manylinux-entrypoint /build_scripts/install-libtool.sh
|
||||
|
||||
COPY build_scripts/install-patchelf.sh /build_scripts/
|
||||
RUN export PATCHELF_VERSION=0.13 && \
|
||||
export PATCHELF_HASH=60c6aeadb673de9cc1838b630c81f61e31c501de324ef7f1e8094a2431197d09 && \
|
||||
export PATCHELF_DOWNLOAD_URL=https://github.com/NixOS/patchelf/archive && \
|
||||
manylinux-entrypoint /build_scripts/install-patchelf.sh
|
||||
|
||||
COPY build_scripts/install-libxcrypt.sh /build_scripts/
|
||||
RUN export LIBXCRYPT_VERSION=4.4.26 && \
|
||||
export LIBXCRYPT_HASH=e8a544dd19171c1e6191a6044c96cc31496d781ba08b5a00f53310d001d58114 && \
|
||||
export LIBXCRYPT_DOWNLOAD_URL=https://github.com/besser82/libxcrypt/archive && \
|
||||
export PERL_ROOT=perl-5.34.0 && \
|
||||
export PERL_HASH=551efc818b968b05216024fb0b727ef2ad4c100f8cb6b43fab615fa78ae5be9a && \
|
||||
export PERL_DOWNLOAD_URL=https://www.cpan.org/src/5.0 && \
|
||||
manylinux-entrypoint /build_scripts/install-libxcrypt.sh
|
||||
|
||||
FROM runtime_base AS build_base
|
||||
COPY build_scripts/install-build-packages.sh /build_scripts/
|
||||
RUN manylinux-entrypoint /build_scripts/install-build-packages.sh
|
||||
|
||||
|
||||
FROM build_base AS build_git
|
||||
COPY build_scripts/build-git.sh /build_scripts/
|
||||
RUN export GIT_ROOT=git-2.33.1 && \
|
||||
export GIT_HASH=02047f8dc8934d57ff5e02aadd8a2fe8e0bcf94a7158da375e48086cc46fce1d && \
|
||||
export GIT_DOWNLOAD_URL=https://www.kernel.org/pub/software/scm/git && \
|
||||
manylinux-entrypoint /build_scripts/build-git.sh
|
||||
|
||||
|
||||
FROM build_base AS build_swig
|
||||
COPY build_scripts/build-swig.sh /build_scripts/
|
||||
RUN export SWIG_ROOT=swig-4.0.2 && \
|
||||
export SWIG_HASH=d53be9730d8d58a16bf0cbd1f8ac0c0c3e1090573168bfa151b01eb47fa906fc && \
|
||||
export SWIG_DOWNLOAD_URL=https://sourceforge.net/projects/swig/files/swig/${SWIG_ROOT} && \
|
||||
export PCRE_ROOT=pcre-8.45 && \
|
||||
export PCRE_HASH=4e6ce03e0336e8b4a3d6c2b70b1c5e18590a5673a98186da90d4f33c23defc09 && \
|
||||
export PCRE_DOWNLOAD_URL=https://sourceforge.net/projects/pcre/files/pcre/8.45 && \
|
||||
manylinux-entrypoint /build_scripts/build-swig.sh
|
||||
|
||||
|
||||
FROM build_base AS build_cpython
|
||||
COPY build_scripts/build-sqlite3.sh /build_scripts/
|
||||
RUN export SQLITE_AUTOCONF_ROOT=sqlite-autoconf-3360000 && \
|
||||
export SQLITE_AUTOCONF_HASH=bd90c3eb96bee996206b83be7065c9ce19aef38c3f4fb53073ada0d0b69bbce3 && \
|
||||
export SQLITE_AUTOCONF_DOWNLOAD_URL=https://www.sqlite.org/2021 && \
|
||||
manylinux-entrypoint /build_scripts/build-sqlite3.sh
|
||||
|
||||
COPY build_scripts/build-openssl.sh /build_scripts/
|
||||
RUN export OPENSSL_ROOT=openssl-1.1.1l && \
|
||||
export OPENSSL_HASH=0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1 && \
|
||||
export OPENSSL_DOWNLOAD_URL=https://www.openssl.org/source && \
|
||||
manylinux-entrypoint /build_scripts/build-openssl.sh
|
||||
|
||||
COPY build_scripts/build-cpython.sh /build_scripts/
|
||||
|
||||
|
||||
FROM build_cpython AS build_cpython36
|
||||
COPY build_scripts/cpython-pubkeys.txt /build_scripts/cpython-pubkeys.txt
|
||||
RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.6.15
|
||||
|
||||
|
||||
FROM build_cpython AS build_cpython37
|
||||
COPY build_scripts/cpython-pubkeys.txt /build_scripts/cpython-pubkeys.txt
|
||||
RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.7.12
|
||||
|
||||
|
||||
FROM build_cpython AS build_cpython38
|
||||
COPY build_scripts/ambv-pubkey.txt /build_scripts/cpython-pubkeys.txt
|
||||
RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.8.12
|
||||
|
||||
|
||||
FROM build_cpython AS build_cpython39
|
||||
COPY build_scripts/ambv-pubkey.txt /build_scripts/cpython-pubkeys.txt
|
||||
RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.9.8
|
||||
|
||||
|
||||
FROM build_cpython AS build_cpython310
|
||||
COPY build_scripts/cpython-pubkey-310-311.txt /build_scripts/cpython-pubkeys.txt
|
||||
RUN manylinux-entrypoint /build_scripts/build-cpython.sh 3.10.0
|
||||
|
||||
|
||||
FROM build_cpython AS all_python
|
||||
COPY build_scripts/install-pypy.sh /build_scripts/install-pypy.sh
|
||||
COPY build_scripts/pypy.sha256 /build_scripts/pypy.sha256
|
||||
RUN manylinux-entrypoint /build_scripts/install-pypy.sh 3.7 7.3.7
|
||||
RUN manylinux-entrypoint /build_scripts/install-pypy.sh 3.8 7.3.7
|
||||
COPY --from=build_cpython37 /opt/_internal /opt/_internal/
|
||||
COPY --from=build_cpython38 /opt/_internal /opt/_internal/
|
||||
COPY --from=build_cpython39 /opt/_internal /opt/_internal/
|
||||
COPY --from=build_cpython310 /opt/_internal /opt/_internal/
|
||||
RUN hardlink -cv /opt/_internal
|
||||
|
||||
|
||||
FROM runtime_base
|
||||
COPY --from=build_git /manylinux-rootfs /
|
||||
COPY --from=build_swig /manylinux-rootfs /
|
||||
COPY --from=build_cpython /manylinux-rootfs /
|
||||
COPY --from=all_python /opt/_internal /opt/_internal/
|
||||
COPY build_scripts/finalize.sh \
|
||||
build_scripts/update-system-packages.sh \
|
||||
build_scripts/python-tag-abi-tag.py \
|
||||
build_scripts/requirements3.7.txt \
|
||||
build_scripts/requirements3.8.txt \
|
||||
build_scripts/requirements3.9.txt \
|
||||
build_scripts/requirements3.10.txt \
|
||||
build_scripts/requirements-base-tools.txt \
|
||||
/build_scripts/
|
||||
COPY build_scripts/requirements-tools/* /build_scripts/requirements-tools/
|
||||
RUN manylinux-entrypoint /build_scripts/finalize.sh && rm -rf /build_scripts
|
||||
|
||||
ENV SSL_CERT_FILE=/opt/_internal/certs.pem
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
|
||||
#Build manylinux_2_27 docker image end
|
||||
|
||||
#Add our own dependencies
|
||||
ADD scripts /tmp/scripts
|
||||
RUN chmod +x /tmp/scripts/manylinux/install_ubuntuos.sh
|
||||
RUN cd /tmp/scripts && /tmp/scripts/manylinux/install_ubuntuos.sh && /tmp/scripts/manylinux/install_deps.sh && rm -rf /tmp/scripts
|
||||
|
||||
ARG BUILD_UID=1001
|
||||
ARG BUILD_USER=onnxruntimedev
|
||||
RUN adduser --uid $BUILD_UID $BUILD_USER
|
||||
WORKDIR /home/$BUILD_USER
|
||||
USER $BUILD_USER
|
||||
ENV PATH /usr/local/gradle/bin:/usr/local/dotnet:$PATH
|
||||
|
|
@ -33,6 +33,7 @@ function fetch_source {
|
|||
if [ -f ${file} ]; then
|
||||
echo "${file} exists, skipping fetch"
|
||||
else
|
||||
apt-get update && apt-get install -y curl gpg-agent
|
||||
curl -fsSL -o ${file} ${url}/${file}
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" ==
|
|||
else
|
||||
COMPILE_DEPS="${COMPILE_DEPS} libdb-devel"
|
||||
fi
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
PACKAGE_MANAGER=apt
|
||||
COMPILE_DEPS="libbz2-dev libncurses5-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev liblzma-dev openssl libssl-dev libkeyutils-dev libkrb5-dev comerr-dev libidn2-0-dev libcurl4-openssl-dev uuid-dev libffi-dev linux-kernel-headers"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
||||
|
|
|
|||
|
|
@ -26,5 +26,9 @@ fi
|
|||
if [ "${AUDITWHEEL_POLICY}" = "musllinux_1_1" ]; then
|
||||
apk add --no-cache bash
|
||||
fi
|
||||
yum install -y yum-plugin-versionlock
|
||||
yum versionlock cuda* libcudnn* libnccl*
|
||||
|
||||
if [ command -v yum &> /dev/null ];
|
||||
then
|
||||
yum install -y yum-plugin-versionlock
|
||||
yum versionlock cuda* libcudnn* libnccl*
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ source $MY_DIR/build_utils.sh
|
|||
# MANYLINUX_DEPS: Install development packages (except for libgcc which is provided by gcc install)
|
||||
if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
||||
MANYLINUX_DEPS="glibc-devel libstdc++-devel glib2-devel libX11-devel libXext-devel libXrender-devel mesa-libGL-devel libICE-devel libSM-devel zlib-devel expat-devel"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
MANYLINUX_DEPS="libc6-dev libstdc++-6-dev libglib2.0-dev libx11-dev libxext-dev libxrender-dev libgl1-mesa-dev libice-dev libsm-dev libz-dev libexpat1-dev"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
||||
MANYLINUX_DEPS="musl-dev libstdc++ glib-dev libx11-dev libxext-dev libxrender-dev mesa-dev libice-dev libsm-dev zlib-dev expat-dev"
|
||||
|
|
@ -53,6 +53,9 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" ==
|
|||
fi
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses5 libreadline7 tk libgdbm3 libdb5.3 libpcap0.8 liblzma5 libssl1.1 libkeyutils1 libkrb5-3 libcomerr2 libidn2-0 libcurl3 uuid libffi6"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
# remove libgdbm3
|
||||
RUNTIME_DEPS="zlib1g libbz2-1.0 libexpat1 libncurses5 libreadline7 tk libdb5.3 libpcap0.8 liblzma5 libssl1.1 libkeyutils1 libkrb5-3 libcomerr2 libidn2-0 libcurl3 uuid libffi6"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "musllinux_1_1" ]; then
|
||||
RUNTIME_DEPS="zlib bzip2 expat ncurses5-libs readline tk gdbm db xz openssl keyutils-libs krb5-libs libcom_err libidn2 libcurl libuuid libffi"
|
||||
else
|
||||
|
|
@ -96,7 +99,7 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|||
yum -y update
|
||||
yum -y install yum-utils curl
|
||||
yum-config-manager --enable extras
|
||||
|
||||
|
||||
#Added by @snnn
|
||||
if [ -d "/usr/local/cuda-10.2" ]; then
|
||||
TOOLCHAIN_DEPS="devtoolset-8-binutils devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-gcc-gfortran"
|
||||
|
|
@ -121,7 +124,7 @@ elif [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ]; then
|
|||
# Install mayeut/devtoolset-10 repo to get devtoolset-10
|
||||
curl -fsSLo /etc/yum.repos.d/mayeut-devtoolset-10.repo https://copr.fedorainfracloud.org/coprs/mayeut/devtoolset-10/repo/custom-1/mayeut-devtoolset-10-custom-1.repo
|
||||
fi
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
PACKAGE_MANAGER=apt
|
||||
BASETOOLS="${BASETOOLS} hardlink hostname"
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ if [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ] || [ "${AUDITWHEEL_POLICY}" ==
|
|||
fi
|
||||
yum clean all
|
||||
rm -rf /var/cache/yum
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get update -qq
|
||||
apt-get upgrade -qq -y
|
||||
|
|
@ -56,7 +56,7 @@ if [ "${BASE_POLICY}" == "manylinux" ]; then
|
|||
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux2010" ]; then
|
||||
mv -f ${LOCALE_ARCHIVE} ${LOCALE_ARCHIVE}.tmpl
|
||||
build-locale-archive --install-langs="en_US.utf8"
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ]; then
|
||||
elif [ "${AUDITWHEEL_POLICY}" == "manylinux_2_24" ] || [ "${AUDITWHEEL_POLICY}" == "manylinux_2_27" ]; then
|
||||
rm ${LOCALE_ARCHIVE}
|
||||
localedef -i en_US -f UTF-8 en_US.UTF-8
|
||||
update-locale LANG=en_US.UTF-8
|
||||
|
|
|
|||
|
|
@ -2,8 +2,17 @@
|
|||
set -e -x
|
||||
|
||||
# Development tools and libraries
|
||||
yum -y install \
|
||||
graphviz
|
||||
if [ -f /etc/redhat-release ]; then
|
||||
yum update && yum -y install graphviz
|
||||
os_major_version=$(cat /etc/redhat-release | tr -dc '0-9.'|cut -d \. -f1)
|
||||
elif [ -f /etc/os-release ]; then
|
||||
apt-get update && apt-get install -y graphviz
|
||||
os_major_version=$(cat /etc/os-release | tr -dc '0-9.'|cut -d \. -f1)
|
||||
else
|
||||
echo "Unsupported OS"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
# Download a file from internet
|
||||
function GetFile {
|
||||
|
|
@ -45,15 +54,11 @@ else
|
|||
PYTHON_EXES=("/opt/conda/bin/python")
|
||||
fi
|
||||
|
||||
os_major_version=$(cat /etc/redhat-release | tr -dc '0-9.'|cut -d \. -f1)
|
||||
|
||||
SYS_LONG_BIT=$(getconf LONG_BIT)
|
||||
mkdir -p /tmp/src
|
||||
GLIBC_VERSION=$(getconf GNU_LIBC_VERSION | cut -f 2 -d \.)
|
||||
|
||||
DISTRIBUTOR=$(lsb_release -i -s)
|
||||
|
||||
if [[ "$DISTRIBUTOR" = "CentOS" && $SYS_LONG_BIT = "64" ]]; then
|
||||
if [[ $SYS_LONG_BIT = "64" ]]; then
|
||||
LIBDIR="lib64"
|
||||
else
|
||||
LIBDIR="lib"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
set -ex
|
||||
|
||||
os_major_version=$(cat /etc/os-release | tr -dc '0-9.'|cut -d \. -f1)
|
||||
|
||||
apt-get update -y && apt-get upgrade -y
|
||||
apt-get install -y software-properties-common
|
||||
|
||||
echo "installing for os major version : $os_major_version"
|
||||
apt-get install -y gdb build-essential tar unzip make aria2 bzip2
|
||||
|
||||
# Install Java
|
||||
# Install automatic documentation generation dependencies
|
||||
apt-get update
|
||||
apt-get install -y openjdk-11-jdk graphviz
|
||||
Loading…
Reference in a new issue