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 support for the BSD platforms #4172

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

Conversation

prep
Copy link

@prep prep commented May 5, 2024

This PR adds the ability to compile and run Ollama on various BSD platforms, specifically DragonFly, FreeBSD, NetBSD and OpenBSD. A couple notes:

  1. It includes support for Vulkan to offload work to the GPU.
  2. It's only been tested on OpenBSD, but hopefully interested parties in this community can test the other platforms.
  3. ollama run is broken on OpenBSD. The readline package uses syscall which OpenBSD has removed from libc and the kernel. Instead, the readline package should be updated to use golang.org/x/sys/unix, similar to how ergochat/readline does it. I didn't want to include that work in this PR.
  4. The tweak in gen_common.sh is to remove a bash'ism so that the file can be sourced from ksh.

On OpenBSD I needed to add these packages:

pkg_add cmake go vulkan-headers

The other platforms will probably have similarly named packages to install.

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.

None yet

1 participant