how to package all dependencies into a jar package and deploy the jar package successfully to an offline machine which without ai.djl cache file? #2671
Unanswered
Black200000
asked this question in
Q&A
Replies: 1 comment
-
The best way is to create a fatjar use maven shade. The limitation is you have to package one jar for each platform: If you want to package windows jar, you can use the following pom.xml show pom.xml
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
@frankfliu
如何把所有依赖项都打入jar包中,将jar包成功部署到离线且无ai.djl缓存文件的机器中?
我现在只能通过提前拷贝ai.djl缓存文件的方式将所需依赖拷贝进离线机器中,请问还有更好的方法吗?求解答
项目地址: https://github.com/Black200000/DJLOfflineProblem.git
为了方便测试,以下是我在windows上的实验的内容
可以观察到无网络连接的电脑B的 C:\Users\Test 目录下生成.djl.ai文件夹,.djl.ai下包含pytorch\1.13.1-20221220-cpu-win-x86_64子文件夹
报错信息如下
我将电脑B中的1.13.1-20221220-cpu-win-x86_64文件夹
删除,将电脑A中的1.13.1-20221220-cpu-win-x86_64文件夹拷贝进电脑B中,电脑B在离线情况下可运行jar包
Beta Was this translation helpful? Give feedback.
All reactions