Ollama LLM on RISC-V (Banana Pi F3)

Опубликовано: 13 Октябрь 2024
на канале: LivingLinux
186
9

If gcc-14 is not available yet with the current image, you can force the installation with aptitude, as explained here:    • Proceed at your own RISC-V! gcc-14 wi...  

I saw a video on YouTube from Houge Langley, that he was able to run Ollama on RISC-V.
   • 进迭时空 Spacemit M1 RISCV 8-core 处理器 ena...  

I asked him if it was easy to compile it, and he pointed me to his Github page.
https://github.com/HougeLangley/ollama

You can find the build instructions here: https://github.com/ollama/ollama/blob...
sudo apt install go cmake gcc
git clone https://github.com/HougeLangley/ollama
cd ollama
go generate ./...
go build .

You can create a proper service, as explained here: https://github.com/ollama/ollama/blob...

Or you can start the service in one terminal session, and run it in another terminal session: ./ollama serve
./ollama run gemma2:2b
  / cant_get_ollama_to_run_in_ubuntu  

In case you run out of memory, you can try to add swap: https://help.ubuntu.com/community/Swa...
sudo dd if=/dev/zero of=/mnt/4GiB.swap bs=1024 count=4194304
sudo chmod 600 /mnt/4GiB.swap
sudo mkswap /mnt/4GiB.swap
sudo swapon /mnt/4GiB.swap

Moondream2: What's in this image /path/to/image

00:00 Intro
00:27 Houge Langley YT Video
02:22 Build Ollama
04:44 Starting Ollama
06:44 Add Swap
08:25 Gemma2:2b
11:40 Moondream 2

If this video was helpful, please like, comment and subscribe!

Bluesky: https://bsky.app/profile/livinglinux....

#riscv #BananaPi #spacemit #ollama