-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Jetson Nano Orin: libnvidia-ml.so does not found, msg="no GPU detected" #3098
Comments
@gab0220 Hello, sorry I missed your issue. I've been working on a patch for this which was just merged today in #2279. The next major release should include the changes that re-enable support for Jetsons. If you would like to run it sooner, you should pull the latest Ollama commit and compile it locally. Note: Jetsons + GPU acceleration + containers is a bit weird compared to other machines. I would advise you check out dusty-nv on Github if you're interested in learning how to get containers working properly on Jetson devices. In the mean time, I am not sure the Ollama container is built to support Jetsons and I haven't personally worked on it yet (coming soon). In the mean time, you should be able to pull the repo and build locally for it to run. Check the documentation for more detailed instructions, and feel free to ping me if you run into any issues. |
The reason libnvidia-ml.so doesn't exist on Jetson devices is because NVidia didn't include the NVidia ML library in Jetpack prior to JP 6. What you had there is a "stub" library, which exists purely so you can compile with nvml support without having nvml library in your driver (to use the binary on another machine). The "stub" doesn't actually contain any code or implementation for code, so it won't work for the purposes of this project on devices running JP < 6. |
Hello @remy415, thank you for your response. I've upgraded the Jetpack to JP6, ensuring that libnvidia-ml.so is now correctly located in its designated directory. Following the manual installation steps outlined in the Linux installation guide and the accompanying tutorial for NVIDIA Jetson Devices, I successfully installed Ollama. The outcome yielded:
I'll keep you informed. |
Their current release is To do this, following the instructions here:
You should now be able to run Ollama with |
Hello @remy415, thank you for your support. I've compile and build ollama using I also created a new Modelfile to allocate more layers on GPU.
This is the result running this model and using Thank you so much! |
Just a note: You shouldn't need to adjust the num_gpu parameter as it should be configured automatically. You should be able to just use the default dolphin model. If there's an issue where not all layers are offloaded, that means that either the model is too big, or there's an underlying issue with the application. |
@remy415 how are we looking on Jetson's in 0.1.33? If you set LD_LIBRARY_PATH to point to the hosts CUDA lib dir, are we still having problems? |
@dhiltgen last time I built it, it worked just fine. I'll give it another run now |
@dhiltgen It works great, just when I set the LD_LIBRARY_PATH it doesn't seem to use host libs: Unless I did something wrong when compiling? I did a standard compile with no special options |
or did you mean from the binary? I forgot to check that. I installed the latest binary and ran it with the ld_lib_path, same result as above: it worked just fine and seemed to use bundled libs |
That's great news that the official binary is working without having to set LD_LIBRARY_PATH. Ultimately the goal is not to require any special settings if possible, so it sounds like we've achieved that. I'm going to go ahead and close this ticket. Let me know if you think there's any lingering glitches we need to re-open it for. |
@dhiltgen according to the logs, it did a GPU library search, found the bundled library and the libraries in the "default" directories, then selected the bundled library. I ran |
Hello everyone! I'm using a Jetson Nano Orin to run Ollama.
docker run --it --runtime=nvidia --gpus 'all,"capabilities=graphics,compute,utility,video,display" --net host --name ollama -e NVIDIA_VISIBLE_DEVICES=all -e $DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --privileged dustynv/langchain:r35.3.1
To verify the availability of GPU within the container, I ran CUDA-Samples, and the tests passed successfully.
curl -fsSL https://ollama.com/install.sh | sh
.The first time I did this, there was an error output during the installation:
I resolved this error by following #2302.
When I run
ollama serve
I have:I attempted:
find / -name "*libnvidia-ml*"
/usr/local/cuda-11.4/targets/aarch64-linux/lib/stubs/libnvidia-ml.so
If I copy or move this library into one of the directories where Ollama searches for it and then run
ollama serve
:I also attempted to use the Ollama container, but encountered the same result.
How can I resolve this issue?
The text was updated successfully, but these errors were encountered: