Added pre-built images
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ RUN dnf install -y \
|
||||
git vim \
|
||||
make gcc cmake ninja-build lld clang clang-devel compiler-rt libcurl-devel \
|
||||
vulkan-loader-devel mesa-vulkan-drivers \
|
||||
glslc \
|
||||
radeontop glslc \
|
||||
&& dnf clean all
|
||||
|
||||
WORKDIR /opt/llama.cpp
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
This repository provides two Fedora Rawhide–based Dockerfiles for building isolated dev containers with AMD’s new **Strix Halo** GPUs (gfx1151):
|
||||
|
||||
- **Docker.rocm**: Builds `llama.cpp` with ROCm (HIP) support targeting gfx1151
|
||||
- **Docker.vulkan**: Builds `llama.cpp` with Vulkan compute support
|
||||
- **Dockerfile.rocm**: Builds `llama.cpp` with ROCm (HIP) support targeting gfx1151
|
||||
- **Dockerfile.vulkan**: Builds `llama.cpp` with Vulkan compute support
|
||||
|
||||
Both images load the latest ROCm/Vulkan libraries from Fedora Rawhide to ensure compatibility with Strix Halo.
|
||||
|
||||
@@ -11,33 +11,78 @@ Both images load the latest ROCm/Vulkan libraries from Fedora Rawhide to ensure
|
||||
|
||||
```
|
||||
.
|
||||
├── Docker.rocm # HIP-based build for ROCm (gfx1151)
|
||||
├── Docker.vulkan # Vulkan-based build
|
||||
└── README.md # This documentation
|
||||
├── Dockerfile.rocm # HIP-based build for ROCm (gfx1151)
|
||||
├── Dockerfile.vulkan # Vulkan-based build
|
||||
└── README.md # This documentation
|
||||
```
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- **Podman** (or Docker aliased to Podman)
|
||||
- **Toolbx** (for creating interactive dev containers, https://containertoolbx.org/)
|
||||
- **Toolbox** (for creating interactive dev containers, https://containertoolbx.org/)
|
||||
- Recent Linux kernel with AMD GPU drivers (`amdgpu`) installed on the host
|
||||
|
||||
## 1. Pulling Pre-built Containers
|
||||
|
||||
If you don't want to build locally, pull pre-built images from the registry:
|
||||
|
||||
```bash
|
||||
podman pull docker.io/kyuz0/amd-strix-halo-toolboxes:rocm
|
||||
podman pull docker.io/kyuz0/amd-strix-halo-toolboxes:vulkan
|
||||
```
|
||||
|
||||
```bash
|
||||
toolbox create llama-rocm \
|
||||
--image docker.io/kyuz0/amd-strix-halo-toolboxes:rocm \
|
||||
-- \
|
||||
--device /dev/kfd \
|
||||
--device /dev/dri \
|
||||
--group-add video \
|
||||
--security-opt seccomp=unconfined
|
||||
```
|
||||
|
||||
```bash
|
||||
toolbox create llama-vulkan \
|
||||
--image docker.io/kyuz0/amd-strix-halo-toolboxes:vulkan \
|
||||
-- \
|
||||
--device /dev/dri \
|
||||
--group-add video \
|
||||
--security-opt seccomp=unconfined
|
||||
```
|
||||
|
||||
## 2. Building the Images
|
||||
|
||||
### ROCm (HIP) Image
|
||||
|
||||
```bash
|
||||
podman build -t llama-rocm -f Dockerfile.rocm .
|
||||
```
|
||||
|
||||
### Vulkan Image
|
||||
|
||||
```bash
|
||||
podman build -t llama-vulkan -f Dockerfile.vulkan .
|
||||
```
|
||||
|
||||
|
||||
- **Podman** (or Docker aliased to Podman)
|
||||
- **Toolbox** (for creating interactive dev containers, https://containertoolbx.org/)
|
||||
- Recent Linux kernel with AMD GPU drivers (`amdgpu`) installed on the host
|
||||
|
||||
## 1. Building the Images
|
||||
|
||||
### ROCm (HIP) Image
|
||||
|
||||
```bash
|
||||
podman build -t llama-rocm -f Docker.rocm .
|
||||
podman build -t llama-rocm -f Dockerfile.rocm .
|
||||
```
|
||||
|
||||
### Vulkan Image
|
||||
|
||||
```bash
|
||||
podman build -t llama-vulkan -f Docker.vulkan .
|
||||
podman build -t llama-vulkan -f Dockerfile.vulkan .
|
||||
```
|
||||
|
||||
|
||||
## 2. Creating Toolbox Containers
|
||||
|
||||
Toolbox will automatically mount your home directory, map your UID:GID, enable X11, and use the host network. You only need to pass through the GPU devices and relax seccomp.
|
||||
@@ -46,7 +91,7 @@ Toolbox will automatically mount your home directory, map your UID:GID, enable X
|
||||
|
||||
```bash
|
||||
toolbox create llama-rocm \
|
||||
--image localhost/llama-rocm:latest \
|
||||
--image docker.io/kyuz0/amd-strix-halo-toolboxes:rocm \
|
||||
-- \
|
||||
--device /dev/kfd \
|
||||
--device /dev/dri \
|
||||
@@ -54,18 +99,19 @@ toolbox create llama-rocm \
|
||||
--security-opt seccomp=unconfined
|
||||
```
|
||||
|
||||
> **Note:** The `--` separator tells `toolbox` to pass subsequent flags to the underlying Podman/Docker command.
|
||||
|
||||
### Vulkan Toolbox
|
||||
|
||||
```bash
|
||||
toolbox create llama-vulkan \
|
||||
--image localhost/llama-vulkan:latest \
|
||||
--image docker.io/kyuz0/amd-strix-halo-toolboxes:vulkan \
|
||||
-- \
|
||||
--device /dev/dri \
|
||||
--group-add video \
|
||||
--security-opt seccomp=unconfined
|
||||
```
|
||||
|
||||
|
||||
## 3. Entering and Testing
|
||||
|
||||
After creation, enter each container and verify that your GPU and libraries are accessible.
|
||||
@@ -86,12 +132,11 @@ You should see your Strix Halo gfx1151 device listed.
|
||||
toolbox enter llama-vulkan
|
||||
# inside container:
|
||||
vulkaninfo | head -n 10
|
||||
llama-cli --help
|
||||
llama-cli --help # run the Vulkan-enabled CLI
|
||||
```
|
||||
|
||||
If `vulkaninfo` reports your GPU and `llama-cli` runs without errors, the Vulkan build is working.
|
||||
|
||||
|
||||
## Host Configuration
|
||||
|
||||
The following host details and kernel settings ensure optimal performance and unified memory access for Strix Halo:
|
||||
@@ -111,8 +156,6 @@ The following host details and kernel settings ensure optimal performance and un
|
||||
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
Both images pull Fedora Rawhide packages for the newest ROCm/Vulkan support.
|
||||
|
||||
## Notes
|
||||
|
||||
Both images pull Fedora Rawhide packages for the newest ROCm/Vulkan support.
|
||||
|
||||
Reference in New Issue
Block a user