aqdqd
This commit is contained in:
@@ -14,35 +14,36 @@ services:
|
|||||||
restart_policy:
|
restart_policy:
|
||||||
condition: on-failure
|
condition: on-failure
|
||||||
|
|
||||||
# --- HARDWARE PERMISSIONS (The Missing Link) ---
|
# Run as root (Required for device access)
|
||||||
# Grant the container permission to lock memory and talk to drivers
|
user: root
|
||||||
|
|
||||||
|
# Grant full hardware access
|
||||||
cap_add:
|
cap_add:
|
||||||
- IPC_LOCK
|
- IPC_LOCK
|
||||||
- SYS_PTRACE
|
- SYS_PTRACE
|
||||||
- SYS_ADMIN
|
- SYS_ADMIN
|
||||||
- SYS_RESOURCE
|
- SYS_RESOURCE
|
||||||
- SYS_NICE
|
- SYS_NICE
|
||||||
|
|
||||||
# Add the container to the Host's 'video' (44) and 'render' (993) groups
|
|
||||||
# group_add:
|
|
||||||
# - "44"
|
|
||||||
# - "993"
|
|
||||||
|
|
||||||
user: root
|
|
||||||
|
|
||||||
|
# THE FULL PASS-THROUGH
|
||||||
devices:
|
devices:
|
||||||
# Map Host 'card1' (AMD) -> Container 'card0' (So it looks like Default GPU)
|
# Map the ENTIRE GPU folder (Let the driver figure it out)
|
||||||
- /dev/dri/card1:/dev/dri/card0
|
- /dev/dri:/dev/dri
|
||||||
- /dev/dri/renderD128:/dev/dri/renderD128
|
|
||||||
- /dev/kfd:/dev/kfd
|
- /dev/kfd:/dev/kfd
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/local-ssd/docker/ollama:/root/.ollama
|
- /mnt/local-ssd/docker/ollama:/root/.ollama
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
# Force support for Navi 21 (6900 XT)
|
||||||
- HSA_OVERRIDE_GFX_VERSION=10.3.0
|
- HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||||
# Now that we spoofed card0, we tell ROCm to use Device 0
|
|
||||||
- ROCR_VISIBLE_DEVICES=0
|
# SELECT THE AMD CARD (Index 1 = card1)
|
||||||
|
- ROCR_VISIBLE_DEVICES=1
|
||||||
|
|
||||||
|
# Helpful fix for eGPUs over PCIe
|
||||||
|
- HSA_ENABLE_SDMA=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