mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-16 21:00:14 +00:00
### Description 1. Update docker files and their build instructions. ARM64 and x86_64 can use the same docker file. 2. Upgrade Linux CUDA pipeline's base docker image from CentOS7 to UBI8 AB#18990
20 lines
1.2 KiB
Text
20 lines
1.2 KiB
Text
# --------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
# --------------------------------------------------------------
|
|
# Dockerfile to run ONNXRuntime with source build for CPU
|
|
|
|
FROM mcr.microsoft.com/cbl-mariner/base/python:3
|
|
MAINTAINER Changming Sun "chasun@microsoft.com"
|
|
ADD . /code
|
|
|
|
RUN tdnf install -y tar ca-certificates build-essential python3-numpy cmake python3-setuptools python3-wheel python3-pip curl python3-devel
|
|
RUN /code/dockerfiles/scripts/install_cmake.sh
|
|
|
|
# Prepare onnxruntime repository & build onnxruntime
|
|
RUN cd /code && python3 -m pip install -r tools/ci_build/github/linux/docker/inference/x64/python/cpu/scripts/requirements.txt && /bin/bash ./build.sh --allow_running_as_root --skip_submodule_sync --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER)
|
|
|
|
FROM mcr.microsoft.com/cbl-mariner/base/python:3
|
|
COPY --from=0 /code/build/Linux/Release/dist /root
|
|
COPY --from=0 /code/dockerfiles/LICENSE-IMAGE.txt /code/LICENSE-IMAGE.txt
|
|
RUN tdnf install -y ca-certificates python3-setuptools python3-wheel python3-pip && python3 -m pip install /root/*.whl && rm -rf /root/*.whl
|