microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator

Home Page:https://onnxruntime.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Caused by: java.lang.UnsatisfiedLinkError: /tmp/onnxruntime-java8147263448488960156/libonnxruntime.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/onnxruntime-java8147263448488960156/libonnxruntime.so)

wangkd0 opened this issue · comments

Describe the issue

我使用Java+opencv+onnxruntime进行模型的推理,并打算使用docker进行部署该springboot项目,下面是我的dockerfile文件内容:

FROM openjdk:8u212-jre

COPY lib/ /photo/lib

ENV LD_LIBRARY_PATH=/photo/lib

COPY boot-server-1.0.0.jar /boot-photo/boot-photo-1.0.0.jar

ENTRYPOINT ["java","-jar","-Dfile.encoding=utf-8","/boot-photo/boot-photo-1.0.0.jar"]

当我启动时,报错:
Caused by: java.lang.UnsatisfiedLinkError: /tmp/onnxruntime-java8147263448488960156/libonnxruntime.so: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /tmp/onnxruntime-java8147263448488960156/libonnxruntime.so)

请问应该怎么在docker中部署使用呢?

To reproduce

如上所述

Urgency

No response

Platform

Other / Unknown

OS Version

docker

ONNX Runtime Installation

Built from Source

ONNX Runtime Version or Commit ID

1.17.1

ONNX Runtime API

Java

Architecture

Other / Unknown

Execution Provider

Other / Unknown

Execution Provider Library Version

No response

What's the base image of the dockerfile? The error comes is because the image is not using a new enough glibc which can typically be caused by using RHEL7, an old Ubuntu, or by basing on a distro which uses musl rather than glibc. If you need to use that exact image then you might be able to compile ORT from source inside the container.