ollama/docs/development.md
Bruce MacDonald 2540c9181c
support for packaging in multiple cuda runners (#509)
* enable packaging multiple cuda versions
* use nvcc cuda version if available

---------

Co-authored-by: Michael Yang <mxyng@pm.me>
2023-09-14 15:08:13 -04:00

622 B

Development

  • Install cmake or (optionally, required tools for GPUs)
  • run go generate ./...
  • run go build .

Install required tools:

  • cmake version 3.24 or higher
  • go version 1.20 or higher
  • gcc version 11.4.0 or higher
brew install go cmake gcc

Get the required libraries:

go generate ./...

Then build ollama:

go build .

Now you can run ollama:

./ollama

Building on Linux with GPU support

  • Install cmake and nvidia-cuda-toolkit
  • run CUDA_VERSION=$(nvcc --version | sed -n 's/^.*release \([0-9]\+\)\.\([0-9]\+\).*$/\1/p') go generate ./...
  • run go build .