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

Add AMD GPU support on Linux #16

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

einfachtorben
Copy link

This PR adds the capability to run ollama on AMD GPU's on Linux.

I Tested it on ARCH Linux with an AMD Radeon RX 6800 XT

@doordormeta
Copy link

doordormeta commented Oct 7, 2024

I had to add privileged:true flag at line 124

`

ollama-gpu-amd:

profiles: ["gpu-amd"]

<<: *service-ollama

image: ollama/ollama:rocm

devices:

  - "/dev/kfd"
 
  - "dev/dri"

privileged: true`

Tested on Pop OS with rx 5600xt

image: ollama/ollama:rocm
devices:
- "/dev/kfd"
- "dev/dri"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be "/dev/dri", no?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should probably be that yes. I'll have to check what my local copy of this says, maybe it would work without it, but still it's better with it in

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried it, would only work if started from /... added the / to he front. Works, thanks for this btw.

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

Successfully merging this pull request may close these issues.

3 participants