mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
26 lines
1.2 KiB
Text
26 lines
1.2 KiB
Text
# --------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
# --------------------------------------------------------------
|
|
# Dockerfile to run ONNXRuntime with MIGraphX integration
|
|
#--------------------------------------------------------------------------
|
|
|
|
FROM rocm/pytorch:rocm6.0_ubuntu20.04_py3.9_pytorch_2.1.1
|
|
|
|
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
|
|
ARG ONNXRUNTIME_BRANCH=main
|
|
|
|
ENV PATH /code/cmake-3.27.3-linux-x86_64/bin:${PATH}
|
|
|
|
RUN apt-get update &&\
|
|
apt-get install -y migraphx
|
|
|
|
WORKDIR /code
|
|
|
|
# Prepare onnxruntime repository & build onnxruntime
|
|
RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
|
|
/bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh &&\
|
|
cd onnxruntime && pip install --upgrade pip &&\
|
|
/bin/sh ./build.sh --allow_running_as_root --cmake_extra_defines ONNXRUNTIME_VERSION=`cat ./VERSION_NUMBER` --config Release --parallel \
|
|
--skip_tests --build_wheel --use_rocm --rocm_version=${ROCM_VERSION} --rocm_home /opt/rocm --use_migraphx &&\
|
|
pip install /code/onnxruntime/build/Linux/Release/dist/*.whl
|