Code Monkey home page Code Monkey logo

Comments (4)

frankfliu avatar frankfliu commented on July 3, 2024

When you usine on K8s, are you using DJLServing? We have kserve integration for DJLServing.

If you set ai.djl.onnx.disable_alternative, you should not use use OnnxRuntime engine to do any NDArray operations for pre/post processing. See: https://docs.djl.ai/docs/hybrid_engine.html

Can you provide more detail about use case, configuration and any code that can reproduce your error?

from djl.

yby1213 avatar yby1213 commented on July 3, 2024

I found that the other way doesn't report this error, when k8s starts the service, if the network is open, it will download the following:
2024-02-20 17:50:31.784 INFO 7 --- [9:8816-thread-2] ai.djl.pytorch.jni.LibUtils : Downloading https://publish.djl.ai/pytorch/1.13.1/cpu/linux-x86_64/native/lib/libc10.so.gz ...
2024-02-20 17:50:33.111 INFO 7 --- [9:8816-thread-2] ai.djl.pytorch.jni.LibUtils : Downloading https://publish.djl.ai/pytorch/1.13.1/cpu/linux-x86_64/native/lib/libtorch_cpu.so.gz ...
2024-02-20 17:51:52.903 INFO 7 --- [9:8816-thread-2] ai.djl.pytorch.jni.LibUtils : Downloading https://publish.djl.ai/pytorch/1.13.1/cpu/linux-x86_64/native/lib/libtorch.so.gz ...
2024-02-20 17:51:53.157 INFO 7 --- [9:8816-thread-2] ai.djl.pytorch.jni.LibUtils : Downloading https://publish.djl.ai/pytorch/1.13.1/cpu/linux-x86_64/native/lib/libgomp-52f2fd74.so.1.gz ...
2024-02-20 17:51:53.871 INFO 7 --- [9:8816-thread-2] ai.djl.pytorch.jni.LibUtils : Downloading jni https://publish.djl.ai/pytorch/1.13.1/jnilib/0.23.0/linux-x86_64/cpu/libdjl_torch.so to cache ...
. But I'm in a network-free environment right now, so it will occurred this error:
java.lang.NoClassDefFoundError: Could not initialize class ai.djl.onnxruntime.engine.OrtNDManager
and I want to put these LibUtils packages into the jar package, Or do you have a better way?

When you usine on K8s, are you using DJLServing? We have kserve integration for DJLServing.

If you set ai.djl.onnx.disable_alternative, you should not use use OnnxRuntime engine to do any NDArray operations for pre/post processing. See: https://docs.djl.ai/docs/hybrid_engine.html

Can you provide more detail about use case, configuration and any code that can reproduce your error?

from djl.

frankfliu avatar frankfliu commented on July 3, 2024

You need use offline PyTorch library in your project. See: https://docs.djl.ai/engines/pytorch/pytorch-engine/index.html#linux-cpu

You can also consider create a fatjar, you can follow this example: https://github.com/deepjavalibrary/djl-demo/tree/master/development/fatjar#how-to-distribute-djl-application

from djl.

yby1213 avatar yby1213 commented on July 3, 2024

ok thank you ,i will try after

from djl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.