ty
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# --- THE BRAIN (Backend Only - P52) ---
|
||||
# --- THE BRAIN (Backend Only) ---
|
||||
ollama:
|
||||
image: ollama/ollama:rocm
|
||||
networks:
|
||||
@@ -13,21 +13,36 @@ services:
|
||||
- node.labels.gpu == true
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
|
||||
# --- HARDWARE PERMISSIONS (The Missing Link) ---
|
||||
# Grant the container permission to lock memory and talk to drivers
|
||||
cap_add:
|
||||
- IPC_LOCK
|
||||
- SYS_PTRACE
|
||||
- SYS_ADMIN
|
||||
- SYS_RESOURCE
|
||||
- SYS_NICE
|
||||
|
||||
# Add the container to the Host's 'video' (44) and 'render' (993) groups
|
||||
group_add:
|
||||
- "44"
|
||||
- "993"
|
||||
|
||||
user: root
|
||||
|
||||
devices:
|
||||
# Map the AMD Card Node (Control)
|
||||
- /dev/dri/card1:/dev/dri/card1
|
||||
- /dev/kfd:/dev/kfd
|
||||
# 2. Mount ONLY the AMD Render Node (The Blinders)
|
||||
# Map Host 'card1' (AMD) -> Container 'card0' (So it looks like Default GPU)
|
||||
- /dev/dri/card1:/dev/dri/card0
|
||||
- /dev/dri/renderD128:/dev/dri/renderD128
|
||||
- /dev/kfd:/dev/kfd
|
||||
|
||||
volumes:
|
||||
# P52 Bind Mount (Already working)
|
||||
- /mnt/local-ssd/docker/ollama:/root/.ollama
|
||||
- /mnt/local-ssd/ollama:/root/.ollama
|
||||
|
||||
environment:
|
||||
- HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||
#- ROCR_VISIBLE_DEVICES=0
|
||||
# Now that we spoofed card0, we tell ROCm to use Device 0
|
||||
- ROCR_VISIBLE_DEVICES=0
|
||||
- OLLAMA_HOST=0.0.0.0
|
||||
- OLLAMA_KEEP_ALIVE=5m
|
||||
- OLLAMA_DEBUG=1
|
||||
|
||||
Reference in New Issue
Block a user