Open Webreaper opened 3 years ago
Cc: @RyanUnderhill
If it helps, this is basically the project I'm trying to dockerise in Alpine, as part of a large app. https://github.com/mentalstack/yolov5-net
Small example repro project here: https://github.com/Webreaper/MLONNXDockerRepro
I'm waiting manylinux's musl support. Once it's done, I will resolve this.
Thanks. No urgency from me, as I've switched to an Ubuntu image (to solve this issue and because I also use EmguCV which also doesn't work on alpine).
This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs. If further support is needed, please provide an update and/or more details.
We don't support alpine yet. We can leverage manylinux docker images to provide such a python package first. If the package works good, we may start to work on adding our own docker files for alpine and build such things for .Net/Java/... .
@faxu, I will assign the item to you now.
Hello, any update on this? Any available workaround on how to make it work on Alpine? Thanks.
Hello, any update on this? I met same problem on Alpine Linux to deploy ML on java server
I ran into the same issue when trying to dockerize my code into an alpine image.
The way I solved it was to first install the onnxruntime package
RUN apk add --no-cache onnxruntime --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing/ -X http://dl-cdn.alpinelinux.org/alpine/edge/community/ -X http://dl-cdn.alpinelinux.org/alpine/edge/main
for some reason this would still give the same "Unable to load library" error. I also had to copy the onnxruntime.so into the same folder as my app
RUN cp /usr/lib/libonnxruntime.so.1.15.1 /app/onnxruntime.so
In my case I was trying to run ML.NET and ONNX in an Azure Function deployed on an Linux instance of Azure App Service.
I was getting the Exception
System.DllNotFoundException: Unable to load shared library 'onnxruntime' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: libonnxruntime: cannot open shared object file: No such file or directory
When attempting to apply an ONNX model.
The solution was to copy the libonnxruntime.so file from the deployment /runtimes/linux-x64/native/ folder to the deployment /bin/ folder.
Describe the bug I'm using ML.Net and ONNX to process object detection with a Yolo onnx model. It works fine on my M1 Macbook pro. But when I deploy it to linux, I get this error:
I've updated the Dockerfile to install libgomp as I've seen recommended around the place (e.g., here) but it doesn't seem to work. I'm not sure if this is something Alpine-related.
My Dockerfile is here.
Urgency Hard deadlines: none
System information
Expected behavior No library exception, and the Inference initialises correctly.