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

Failed to download PyTorch native library #54

Open
lacan opened this issue Feb 2, 2024 · 0 comments
Open

Failed to download PyTorch native library #54

lacan opened this issue Feb 2, 2024 · 0 comments

Comments

@lacan
Copy link

lacan commented Feb 2, 2024

I've followed the installation steps for this extension and when it comes to installing PyTorch it fails with

11:27:31.954	[wsinfer1]	ERROR	qupath.ext.wsinfer.ui.PytorchManager	Failed to download PyTorch native library	ai.djl.engine.EngineException: Failed to download PyTorch native library
	at ai.djl.pytorch.jni.LibUtils.downloadPyTorch(LibUtils.java:481)
	at ai.djl.pytorch.jni.LibUtils.findNativeLibrary(LibUtils.java:292)
	at ai.djl.pytorch.jni.LibUtils.getLibTorch(LibUtils.java:92)
	at ai.djl.pytorch.jni.LibUtils.loadLibrary(LibUtils.java:80)
	at ai.djl.pytorch.engine.PtEngine.newInstance(PtEngine.java:53)
	at ai.djl.pytorch.engine.PtEngineProvider.getEngine(PtEngineProvider.java:40)
	at ai.djl.engine.Engine.getEngine(Engine.java:190)
	at qupath.ext.wsinfer.ui.PytorchManager.lambda$getEngineOnline$1(PytorchManager.java:91)
	at qupath.ext.wsinfer.ui.PytorchManager.callWithTempProperty(PytorchManager.java:125)
	at qupath.ext.wsinfer.ui.PytorchManager.callOnline(PytorchManager.java:117)
	at qupath.ext.wsinfer.ui.PytorchManager.getEngineOnline(PytorchManager.java:91)
	at qupath.ext.wsinfer.ui.WSInferController$WSInferTask.call(WSInferController.java:548)
	at qupath.ext.wsinfer.ui.WSInferController$WSInferTask.call(WSInferController.java:509)
	at javafx.concurrent.Task$TaskCallable.call(Task.java:1426)
	at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.nio.file.AccessDeniedException: C:\Users\oburri\.djl.ai\pytorch\tmp6876596744470295850 -> C:\Users\oburri\.djl.ai\pytorch\2.0.1-cpu-win-x86_64
	at java.base/sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileCopy.move(Unknown Source)
	at java.base/sun.nio.fs.WindowsFileSystemProvider.move(Unknown Source)
	at java.base/java.nio.file.Files.move(Unknown Source)
	at ai.djl.util.Utils.moveQuietly(Utils.java:132)
	at ai.djl.pytorch.jni.LibUtils.downloadPyTorch(LibUtils.java:478)
	... 17 more

I tried changing the rights on that folder (C:\Users\oburri\.djl.ai) to something fully permissive but to no avail. Any hints on how I can tackle this?

Thanks

Oli

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

1 participant