diff --git a/AI/image-list.yml b/AI/image-list.yml index b1e9eb985931df53fca7f38a20436f019084366d..130feb3a0082e9ca546ec0dda319c683c8d009aa 100644 --- a/AI/image-list.yml +++ b/AI/image-list.yml @@ -7,6 +7,7 @@ images: agent: opea/agent agent-ui: opea/agent-ui onnx: onnx + onnxruntime: onnxruntime cann: cann dlrm: dlrm avatarchatbot: opea/avatarchatbot diff --git a/AI/onnxruntime/1.22.1/24.03-lts-sp2/Dockerfile b/AI/onnxruntime/1.22.1/24.03-lts-sp2/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..e5cacd786e945f15538b800628da5cd6597c2a42 --- /dev/null +++ b/AI/onnxruntime/1.22.1/24.03-lts-sp2/Dockerfile @@ -0,0 +1,63 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp2 +ARG VERSION=v1.22.1 + +FROM $BASE as builder + +ARG VERSION + +RUN yum update -y && \ + yum install -y \ + tar \ + ca-certificates \ + gcc-toolset-14-gcc* \ + gcc-toolset-14-binutils* \ + gcc-toolset-14-c++* \ + python3-devel \ + python3-pip \ + python3-setuptools \ + python3-wheel \ + python3-numpy \ + python3-flatbuffers \ + python3-packaging \ + python3-protobuf \ + git && \ + yum clean all && \ + rm -rf /var/cache/yum + +RUN pip install --upgrade pip && \ + pip install --no-cache-dir \ + cmake==3.28 + +ARG ONNXRUNTIME_REPO=https://github.com/microsoft/onnxruntime.git + +RUN ln -sf /usr/lib64/libgcc_s.so.1 /opt/openEuler/gcc-toolset-14/root/usr/lib64/libgcc_s.so.1 && \ + source /opt/openEuler/gcc-toolset-14/enable && \ + git clone --recursive -b $VERSION $ONNXRUNTIME_REPO && \ + cd onnxruntime && \ + ./build.sh --allow_running_as_root --skip_submodule_sync --config Release --build_wheel --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) + +ARG BASE +FROM $BASE as runtime + +COPY --from=builder onnxruntime/build/Linux/Release/dist/*.whl /root + +WORKDIR /root + +RUN yum update -y && \ + yum install -y \ + ca-certificates \ + python3-setuptools \ + python3-wheel \ + python3-pip \ + python3-numpy \ + python3-flatbuffers \ + python3-packaging \ + python3-protobuf \ + python3-mpmath \ + python3-sympy && \ + yum clean all && \ + rm -rf /var/cache/yum + +RUN python3 -m pip install coloredlogs humanfriendly onnx && \ + python3 -m pip install --no-index --find-links /root onnxruntime && \ + rm -rf /root/*.whl \ No newline at end of file diff --git a/AI/onnxruntime/meta.yml b/AI/onnxruntime/meta.yml new file mode 100644 index 0000000000000000000000000000000000000000..d550b3ff10a8937da482c74543ac6a8c689e22d6 --- /dev/null +++ b/AI/onnxruntime/meta.yml @@ -0,0 +1,2 @@ +1.22.1-oe2403sp2: + path: 1.22.1/24.03-lts-sp2/Dockerfile \ No newline at end of file