compiling ollama from source by using a docker container with a prebuilt rocm 6.1 dev environment:
rocm/dev-ubuntu-22.04:6.1-complete
Install these packages first
apt install cmake git
apt install software-properties-common
add-apt-repository ppa:longsleep/golang-backports
apt install golang-go
Clone the repo
git clone https://github.com/ollama/ollama /rtt/o........
Here is an old VMexample which is strange, it looks like Debian has removed this from all the repos. The easiest solution is just to upgrade to a kernel with a working/supported headers, but we don't like doing things the hard way.
In this case it's a 1 year old Debian 11 install, but this can and does happen on random Linux distros sometimes, especially Debian based.
apt-cache search `uname -r`
linux-image-amd64 - Linux for 64-bit PCs (meta-package)........
Here is an example /etc/apt/sources.list after a default Debian 11 install but generally this applies to almost any Debian.
# deb cdrom:[Debian GNU/Linux 11.2.0 _Bullseye_ - Official amd64 NETINST 20211218-11:12]/ bullseye main
#deb cdrom:[Debian GNU/Linux 11.2.0 _Bullseye_ - Official amd64 NETINST 20211218-11:12]/ bullseye main
deb http://deb.debian.org/debian/ bullseye main
deb-src http://deb.debian.org/debian/ bullseye main........
The issue is that Docker images are stripped down, so many tools and even python3 is missing, so you'll have to build or update the actual image yourself.
I assume you have started an image with something like this and that you have the Nvidia Toolkit installed (assuming you are using GPUs). If you're not using nvidia just remove --runtime=nvidia --gpus all.
docker run -it --runtime=nvidia --gpus all ubuntu bash
These works for most images li........
1. Let's work from an environment where we can install Ansible on.
If you are using an older version of Linux based on Mint 18 or Ubuntu 16, you may want to get the PPA and get the latest version of Ansible that way:
sudo apt install gpg
sudo add-apt-repository ppa:ansible/ansible
sudo apt update........