-
Hi, I want to build a dockerized java app that uses the onnx binding. I was wondering if anyone has experience with this. I built the CUDA docker container first: docker build -t onnxruntime-cuda -f ./dockerfile/Dockerfile.cuda . Next in my dockerfile:
I was able to run this successfully: docker build -t onnx-java-app
docker run -it --gpus all --rm onnx-java-app i.e. the ORT session runs. However, the step
I'm aware that this problem has existed, and that I should probably build the java project from scratch, but I don't know where to start. I'm using the maven repositories for ONNX, so I didn't really have to do any building before, much less with gradle. Do I need to build a jar with gradle from the java sub-folder on my GPU machine, then link it somehow to my maven project? Is this the correct approach? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
To build ORT for java you should run |
Beta Was this translation helpful? Give feedback.
-
Where should I be building this? I just built ORT on my host machine and then built the maven jarfile, but when I move this into the docker container, the error still persists. Is this supposed to be built in the docker container? Because on my host I'm running cuda 11.8, whereas docker seems to run 12.x |
Beta Was this translation helpful? Give feedback.
You need to build it with the same CUDA version, preferably in the same place.