mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
21 lines
985 B
Text
21 lines
985 B
Text
# --------------------------------------------------------------
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
# Licensed under the MIT License.
|
|
# --------------------------------------------------------------
|
|
# Dockerfile to run ONNXRuntime with ROCm integration
|
|
#--------------------------------------------------------------------------
|
|
|
|
FROM rocm/pytorch:rocm5.2.3_ubuntu20.04_py3.7_pytorch_1.12.1
|
|
|
|
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
|
|
ARG ONNXRUNTIME_BRANCH=main
|
|
|
|
WORKDIR /code
|
|
|
|
# Prepare onnxruntime repository & build onnxruntime
|
|
RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
|
|
cd onnxruntime &&\
|
|
/bin/sh ./build.sh --config Release --build_wheel --update --build --parallel --cmake_extra_defines\
|
|
ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) --use_rocm --rocm_home=/opt/rocm &&\
|
|
pip install /code/onnxruntime/build/Linux/Release/dist/*.whl &&\
|
|
cd ..
|