Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TensorFlow Library is causing prompt to install Java on Mac OS #133

Closed
murphye opened this issue Jul 15, 2020 · 4 comments
Closed

TensorFlow Library is causing prompt to install Java on Mac OS #133

murphye opened this issue Jul 15, 2020 · 4 comments

Comments

@murphye
Copy link

murphye commented Jul 15, 2020

There seems to be an issue with how the TensorFlow library from DJL is linked to the JRE that is causing a prompt to install JRE Version 6. This link seems to provide further info on the problem: imagej/pyimagej#10

another workaround is to link to libjli instead of libjvm

Reference info from another issue:


Ok, so this is what I get when I run the executable and hit the /detect endpoint:

ermurphy@MacBook-Pro-7 pneumonia-detection-quarkus % target/pneumonia-detection-quarkus-1.0.0-SNAPSHOT-runner 
__  ____  __  _____   ___  __ ____  ______ 
 --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
 -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
2020-07-15 01:13:46,142 INFO  [io.quarkus] (main) pneumonia-detection-quarkus 1.0.0-SNAPSHOT native (powered by Quarkus 1.6.0.Final) started in 0.024s. Listening on: http://0.0.0.0:8080
2020-07-15 01:13:46,142 INFO  [io.quarkus] (main) Profile prod activated. 
2020-07-15 01:13:46,142 INFO  [io.quarkus] (main) Installed features: [cdi, resteasy, resteasy-jackson]
2020-07-15 01:14:15,762 DEBUG [ai.djl.rep.zoo.ModelZoo] (executor-thread-1) Searching model in zoo provider: ai.djl.tensorflow.zoo.TfZooProvider
2020-07-15 01:14:15,762 DEBUG [ai.djl.rep.zoo.ModelZoo] (executor-thread-1) Searching model in zoo provider: ai.djl.repository.zoo.DefaultZooProvider
2020-07-15 01:14:15,763 DEBUG [ai.djl.rep.zoo.ModelZoo] (executor-thread-1) No model zoo found in zoo provider: ai.djl.repository.zoo.DefaultZooProvider
2020-07-15 01:14:15,763 DEBUG [ai.djl.rep.zoo.ModelZoo] (executor-thread-1) Checking ModelLoader: cv/image_classification ai.djl.tensorflow:resnet
Loading:     100% |████████████████████████████████████████|
2020-07-15 01:14:15,771 DEBUG [ai.djl.uti.cud.CudaUtils] (executor-thread-1) cudart library not found.
2020-07-15 01:14:15,771 DEBUG [ai.djl.ten.eng.LibUtils] (executor-thread-1) Using cache dir: /Users/ermurphy/.tensorflow/cache
2020-07-15 01:14:15,771 DEBUG [ai.djl.ten.eng.LibUtils] (executor-thread-1) Loading TensorFlow library from: /Users/ermurphy/.tensorflow/cache/2.2.0-cpu-osx-x86_64/libjnitensorflow.dylib
No Java runtime present, requesting install.

I then get a pop up window from Mac OS asking me to install Java 6! Weird, right?

Screen Shot 2020-07-15 at 1 25 43 AM

Update: Upon some research, I found this is related to JNI linking to Java libraries in Mac OS and it may require some change to how TensorFlow is linked, but I am not sure. I did not have this issue previously with the TensorFlow native libraries from the TensorFlow project.

Originally posted by @murphye in #103 (comment)

@frankfliu
Copy link
Contributor

I don't have this problem on my Mac, I'm using a fresh Mojave. However, my coworker has the same issue as you. He's mac was upgraded to Mojave from older version.

@murphye
Copy link
Author

murphye commented Jul 16, 2020

I am using Catalina (10.15.5) that has been upgraded a few times.

@stu1130
Copy link
Contributor

stu1130 commented Jul 28, 2020

@murphye just want to keep you posted. The author of the JavaCpp is fixing this issue. bytedeco/javacpp#417
I will let you know once the bug is fixed

@frankfliu
Copy link
Contributor

JavaCPP 1.5.4 resolved this issue. We upgraded to javacpp 1.5.4. Will be resolved in DJL 0.8.0 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants