ty
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
version: '3.8'
|
version: '3.8'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# --- THE BRAIN (Backend Only - P52) ---
|
# --- THE BRAIN (Backend Only) ---
|
||||||
ollama:
|
ollama:
|
||||||
image: ollama/ollama:rocm
|
image: ollama/ollama:rocm
|
||||||
networks:
|
networks:
|
||||||
@@ -13,21 +13,36 @@ services:
|
|||||||
- node.labels.gpu == true
|
- node.labels.gpu == true
|
||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
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
|
user: root
|
||||||
|
|
||||||
devices:
|
devices:
|
||||||
# Map the AMD Card Node (Control)
|
# Map Host 'card1' (AMD) -> Container 'card0' (So it looks like Default GPU)
|
||||||
- /dev/dri/card1:/dev/dri/card1
|
- /dev/dri/card1:/dev/dri/card0
|
||||||
- /dev/kfd:/dev/kfd
|
|
||||||
# 2. Mount ONLY the AMD Render Node (The Blinders)
|
|
||||||
- /dev/dri/renderD128:/dev/dri/renderD128
|
- /dev/dri/renderD128:/dev/dri/renderD128
|
||||||
|
- /dev/kfd:/dev/kfd
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
# P52 Bind Mount (Already working)
|
- /mnt/local-ssd/ollama:/root/.ollama
|
||||||
- /mnt/local-ssd/docker/ollama:/root/.ollama
|
|
||||||
environment:
|
environment:
|
||||||
- HSA_OVERRIDE_GFX_VERSION=10.3.0
|
- 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_HOST=0.0.0.0
|
||||||
- OLLAMA_KEEP_ALIVE=5m
|
- OLLAMA_KEEP_ALIVE=5m
|
||||||
- OLLAMA_DEBUG=1
|
- OLLAMA_DEBUG=1
|
||||||
|
|||||||
Reference in New Issue
Block a user