Install system packages #
Install the following packages if they were not already done.
sudo apt update && sudo apt install docker-compose-v2 docker.io linux-oem-24.04c python3.12-venv
Install Ollama #
ROCm #
apt get install docker-buildx docker.io docker-compose-v2
git clone https://github.com/dhiltgen/ollama.git
docker build --build-arg FLAVOR=rocm --tag ollama-rocm7.2 --platform=linux/amd64 .
Once the project is built
sudo docker run --restart=unless-stopped -d --device /dev/kfd --device /dev/dri -v ollama:/root/.ollama -p 11435:11434 -e OLLAMA_CONTEXT_LENGTH=250000 -e GGML_CUDA_ENABLE_UNIFIED_MEMORY1=1 -e HSA_XNACK=1 -e ROCBLAS_USE_HIPBLASLT=1 -e GPU_MAX_HW_QUEUES=2 -e OLLAMA_NUM_PARALLEL=1 -e OLLAMA_MAX_LOADED_MODELS=1 -e OLLAMA_FLASH_ATTENTION=1 -e OLLAMA_DEBUG=1 --name ollama ollama:rocm-7.2
Vulkan #
curl -fsSL https://ollama.com/install.sh | sh
Once Ollama is installed update the systemctl file
sudo nano /etc/systemd/system/ollama.service
[Service]
Environment="OLLAMA_HOST=0.0.0.0"
Environment="OLLAMA_CONTEXT_LENGTH=128000"
#Environment="HSA_OVERRIDE_GFX_VERSION=11.5.1"
Environment="OLLAMA_VULKAN=1"
Environment="ROCR_VISIBLE_DEVICES=-1"
Environment="OLLAMA_DEBUG=1"
sudo systemctl daemon-reload && sudo systemctl restart ollama
Install Open-WebUI #
sudo docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main
Install Orpheus-FastAPI #
Up to date information can be found here
git clone https://github.com/Lex-au/Orpheus-FastAPI.git
cd Orpheus-FastAPI/
cp .env.example .env
sudo docker compose -f docker-compose-gpu-rocm.yml up
Install ComfyUI #
Up to date information can be found here
python3 -m venv comfyui-venv
source comfyui-venv/bin/activate
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1/torch-2.8.0%2Brocm7.1.0.lw.git7a520360-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1/torchvision-0.23.0%2Brocm7.1.0.git824e8c87-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1/triton-3.4.0%2Brocm7.1.0.gitf9e5bf54-cp312-cp312-linux_x86_64.whl
wget https://repo.radeon.com/rocm/manylinux/rocm-rel-7.1/torchaudio-2.8.0%2Brocm7.1.0.git6e1c7fe9-cp312-cp312-linux_x86_64.whl
pip3 uninstall torch torchvision triton torchaudio
pip3 install torch-2.8.0+rocm7.1.0.lw.git7a520360-cp312-cp312-linux_x86_64.whl torchvision-0.23.0+rocm7.1.0.git824e8c87-cp312-cp312-linux_x86_64.whl torchaudio-2.8.0+rocm7.1.0.git6e1c7fe9-cp312-cp312-linux_x86_64.whl triton-3.4.0+rocm7.1.0.gitf9e5bf54-cp312-cp312-linux_x86_64.whl
git clone https://github.com/comfyanonymous/ComfyUI.git && cd ComfyUI
pip install -r requirements.txt
To run it as a systemctl service
sudo nano /etc/systemd/system/comfyui.service
[Unit]
Description=ComfyUI Service
After=network.target
[Service]
Type=simple
User=mike
Group=mike
WorkingDirectory=/home/mike/ComfyUI/
ExecStart=/home/mike/comfyui-venv/bin/python main.py --enable-manager --listen 0.0.0.0
[Install]
WantedBy=multi-user.target