robertrosenbusch/gfx803_rocm
소개
General Site for the GFX803 ROCm Stuff
시스템 및 인프라측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
OriginalDockerized ROCm 6.4.0 to use fancy AI Stuff on Ollama/WhisperX/ComfyUI on [GFX803/Polaris/RX5x0]
This repo provides some docker main buildfiles based on the original published/sponsored AMD ROCm-DEV-Dockerimage to (re)compile PyTorch, Torchvision/Torchaudio, ROCBlas and CTranslate2 for the AMD RX570/RX580/RX590 to:
- use PyTorch on gfx803
- generate AI Pics on ComfyUI on gfx803
- use WhisperX to fast automatic speech recognition and transcription on gfx803
- and use Ollama for LLVMs on gfx803
into a Docker based on the same AMD-ROCm Stack.
Quick links
- General hints on GFX803 and about Motivations. You should read it. it could save lifetime.
- DockerBase GFX803|Docker-Components | Install
- Ollama GFX803 |Docker-Components | Install|Benchmark |
- ComfyUi on PyTorch GFX803 | Docker-Components | Install|Benchmark|
- PyTorch GFX803 |Docker-Components|Install
- WhsiperX on PyTorch GFX803 | Docker-Components | Install
Motivation
Ollama, PyTorch, Torchvision/Torchaudio and rocBLAS-Library are not compiled to use the GPU-Polaris generation in the original PIP repository. And of course not compiled too in the official ROCm-PyTorch Dockerfile. However, if Polaris/gfx803 GPU support is to be used in Ollama,ComfyUI or WhisperX on ROCm, there is no way around newly compiled PyTorch and Torchvision/Torchaudio whl/wheel python files. And for Ollama in ROCm 6.X you have to recompile the rocBLAS-Library too. That what this Docker Buildfile(s) will do for you.
[!IMPORTANT] Before you start to build the Specific Container on what AI-App you wanna use for your GFX803-GPU, please check up the next few hints. It could save Lifetime to debug and prevent bad moods or throwing away your gfx803-GPU in a big bow.
[!NOTE]
At General
- This is an hobby enthusiastic Project into my freetime. gfx803 on ROCm is not supported since over three years on any Linux-Distro and was never designed to do some fancy AI-Stuff. So be carefull. Feel free to ask or to make some hints to improve this "project"
- The published Dockercontainers downloaded a lot of stuff and needed a lot of time and storage space to recompile the neccesarry Stuff for gfx803. Big aware, its not my fault.
- Make sure you had have 16 Gigs RAM, a good ISP-Connection, around 50 Gig free Storage and at least one to three hours time to recompile, depends what kind of APP you wanna use and your Hardware/ISP.
- Feel free to research/rebuild for ROCm/gfx803 on your Distro-Baremetal-ROCm to use it natively. I am not interessted on, cause i dont wanna maintain any specific Distro-Version. I am sorry.
[!NOTE]
ROCm hardware requirements
- Make sure, that both Kernel-Devices
/dev/driand/dev/kfdare aviable- Make sure, your Mainboard support PCIe atomic for your connected gfx803-GPU(s)
sudo grep flags /sys/class/kfd/kfd/topology/nodes/*/io_links/0/properties- If you wanna use more then one gfx803 aka multiple GPUs take a look on this
[!NOTE]
ROCm software requirements
- Make sure your user to start the Dockercontainer is a member of both groups
renderandvideo.- it could be possible (depends on your Linux-Distro) to add a udev-Rule.
- it is unimportant, which version of ROCm do you use on your Hostsystem
- it is not necessary to install the entire or any ROCm-Stack-Part on the host system. The whole ROCm magic happens inside the Dockercontainer
[!TIP] You should reboot after adding groups to your user and before you start the Dockercontainer.
[!CAUTION]
Prevent ROCm SegFaults on your Linux Distro
After some feedback/research from Users who are using the Dockercontainer from this GIT in Ollama and PyTorch/ComfyUI, cause the devices
/dev/driand/dev/kfdcrashed with SegFaults. Please proofe your used Linux-Kernel Version and switch up or down to a well known working Kernel-Version. Fedora 41, Arch and Debian 13 using (in August 2015) suspicious Linux-Kernel-Versions as default.
Kernel Version >=6.15.8 6.14 6.13 >=6.12.21 6.11 6.10 6.9 6.8 6.6 6.2 5.19 profed and working on ROCm6.4.(x) ✅ 🟥 🟥 ✅ ✅ ✅ ✅ ✅ ✅ ✅ ✅ Beware(!) the AMD-ROCm Team just only official support these Kernel-Versions!
ROCm-6.4.0: Docker Baseimage for RX5(x)0/GFX803
[!IMPORTANT] Build this Docker Baseimage for all other fancy AI stuff on GFX803. Its all based on an official AMD ROCm Docker
[!NOTE] It could take around 30 to 60 minutes to download, recompile and build this base ROCm container Image, depends on your Hardware and your ISP
ROCm-6.4.0: Used Docker Components for Baseimage on RX5(x)0/GFX803
| OS | ROCm | rocBLAS | Python | GPU |
|---|---|---|---|---|
| Ubuntu 24.04 | 6.4.0 | 6.4.0 | 3.12 | RX5(x)0 aka Polaris 20/21 aka GCN 4 |
ROCm-6.4.0: Build/Install Baseimage for GFX803 to do some fancy AI Stuff
- Checkout this GIT repo via
git clone https://github.com/robertrosenbusch/gfx803_rocm.gitand change into the directorygfx803_rocm - Build the GFX803-Base-Docker-Image
docker build -f Dockerfile_rocm64_base . -t 'rocm6_gfx803_base:6.4'
Ollama
ROCm-6.4.0: Used Docker Components for Ollama v0.9.(x) and OpenWebui on RX5(x)0/GFX803
- Exposed Ports: 8080,11434
- Ollama : v0.9.0
- OpenWebui-GUI latest
- Interactive LLM-Benchmark for Ollama: latest
ROCm-6.4.0: Build/Install Ollama v0.9.(x) and Open-Webui on RX5(x)0/GFX803
[!NOTE] You should have at least 8 GB of VRAM available to run up to 7B models, and two GFX803 cards to run the 13B models
- build the Docker Baseimage from this GITRepo for gfx803 first.
- Build the Docker Image for Ollama, it takes aroud 60 Minutes:
docker build -f Dockerfile_rocm64_ollama . -t 'rocm64_gfx803_ollama:0.9.0' - Start the container via
docker run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8080:8080 -p 11434:11434 --name rocm64_ollama_090 rocm64_gfx803_ollama:0.9.0 bash - Enter to the Dockercontainer
docker exec -ti rocm64_ollama_090 bash - download a model you need for e.g.
./ollama run deepseek-r1:1.5b - Open your Webbrowser
http://YOUR_LOCAL_IP:8080to use Open-WebUI - If you wanna use e.g. VSCode or Open-WebUI from outside, the Port 11434 is exposed too.
- For Benchmark your downloaded Models use
python3 /llm-benchmark/benchmark.pyinside the container
ROCm-6.4.0: Benchmark Ollama v0.6.(x)/ v0.7.(x)/v0.8.(x)/v0.9.(x) on RX570
Benchmarks for Ollama moved to Wiki
ComfyUI
ROCm-6.4.0: Used Docker Components for ComfyUI
- Exposed ComfyUI GUI Port: 8188
- PyTorch GIT: v2.6.0
- Torchvison GIT: v0.21.0
- TorchAudio GIT: v2.6.0
- ComfyUI GIT: latest
- ComfyUI Manager: latest
ROCm-6.4.0: Build/Install ComfyUI on RX5(x)0/GFX803
[!WARNING]
It takes a lot of time and Storage space to compile. Around 50 GByte Storage and 2.5 hours to (re-)compile. Keep your head up. Its worth!
[!NOTE]
- Since ROCm 6.0 you have to use the
--lowvramoption at ComfyUI's main.py to create correct results. Dont know why ...- Since PyTorch 2.4 you have to use the
MIOPEN_LOG_LEVEL=3Environment-Var to surpress HipBlas-Warnings. Dont know why ...
- build the Docker Baseimage from this GITRepo for gfx803 first.
- build your Docker image via
docker build -f Dockerfile_rocm64_comfyui . -t 'rocm64_gfx803_comfyui:latest' - start the container via:
docker run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 8188:8188 -v /YOUR_LOCAL_COMFYUI_MODELS/:/comfy/ --name rocm64_comfyui rocm64_gfx803_comfyui:latest /bin/bash - Open your Webbrowser
http://YOUR_LOCAL_IP:11434to use ComfyUI - Enter to the Dockercontainer
docker exec -ti rocm64_gfx803_comfyui:latest bashand Download your Modelstuff or SymLink it from/comfy - You will find the GFX803/Polaris compiled Python-Wheel-Files inside into the
/pytorch/dist,/vision/distand/audio/distDirectory.
ROCm-6.3.0 ComfyUI Benchmark on RX570/RX590
Benchmarks for ComfyUI moved to Wiki
PyTorch
ROCm-6.4.0: Used Docker Components for PyTorch,TorchVision and TorchAudio on RX5(x)0/GFX803
ROCm-6.4.0: Build/Install PyTorch, TorchVision and TorchAudio on RX5(x)0/GFX803
[!WARNING]
It takes a lot of time and Storage space to compile. Around 40 GByte Storage and 2 hours to (re-)compile. You need 16 Gig RAM on your host system. Keep your head up. Its worth!
- build the Docker Baseimage from this GITRepo for gfx803 first.
- build your Docker image via
docker build -f Dockerfile_rocm64_pytorch . -t 'rocm64_gfx803_pytorch:2.6' - start the container via:
docker run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --name rocm64_pytorch_26 rocm64_gfx803_pytorch:2.6 bash - to confirm your gfx803 working right use a script like this one.
WhisperX
ROCm-6.4.0: Used Docker Components for WhisperX
- Exposed WhisperX GUI Port: 7860
- PyTorch GIT: v2.6.0
- Torchvison GIT: v0.21.0
- TorchAudio GIT: v2.6.0
- CTranslate for ROCm: latest
- WhisperX WebUI: latest
ROCm-6.4.0: Build/Install WhisperX on RX5(x)0/GFX803
[!NOTE] It takes a lot of time to (re)-compile all this Stuff for your GFX803 Card (around 3 hrs) Beware you only use Models who fits into your GPU-VRAM
- build the Docker Baseimage from this GITRepo for gfx803 first.
- Build the Docker Image for WhisperX, it takes aroud 2,5 hours:
docker build -f Dockerfile_rocm64_whisperx . -t 'rocm64_gfx803_whisperx:latest' - Start the container via
docker run -it --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -p 7860:7860 -e JOBLIB_MULTIPROCESSING=0 --name rocm64_whisperx rocm64_gfx803_whisperx:latest bash - Open your Webbrowser
http://YOUR_LOCAL_IP:7860to use WhisperX-WebUI and Download a tiny/small/default LLVM to transcribe - Enter to the Dockercontainer
docker exec -ti rocm64_gfx803_whisperx:latest bashand useamdgpu_topto monitor your GPU
관련 프로젝트 살펴보기
불러오는 중…