added .env env-example, refactored docker-compose

This commit is contained in:
Luca Sacchi Ricciardi
2026-03-27 14:54:17 +00:00
parent 852481ea73
commit 56077b6fe0
3 changed files with 16 additions and 8 deletions

5
.env Normal file
View File

@@ -0,0 +1,5 @@
# Porta esposta sull'host e usata internamente dal server
SERVER_PORT=8000
# Nome esatto del file GGUF presente nella cartella ./models
MODEL_FILENAME=Qwen3.5-0.8B-UD-Q8_K_XL.gguf

View File

@@ -1,20 +1,18 @@
services: services:
qwen-08b: llamacpp-server:
build: . build: .
container_name: qwen_08b_server container_name: llamacpp_${SERVER_PORT}
ports: ports:
- "8000:8000" - "${SERVER_PORT}:${SERVER_PORT}"
devices: devices:
- /dev/kfd:/dev/kfd - /dev/kfd:/dev/kfd
- /dev/dri:/dev/dri - /dev/dri:/dev/dri
volumes: volumes:
- /opt/models:/models - ./models:/models
# -ngl 99 offloada tutti i layer sulla GPU AMD
# --host 0.0.0.0 lo rende accessibile fuori dal container
command: > command: >
-m /models/Qwen3.5-0.8B-UD-Q8_K_XL.gguf -m /models/${MODEL_FILENAME}
--host 0.0.0.0 --host 0.0.0.0
--port 8000 --port ${SERVER_PORT}
-ngl 99 -ngl 99
-c 4096 -c 4096
restart: unless-stopped restart: unless-stopped

5
env-example Normal file
View File

@@ -0,0 +1,5 @@
# Porta esposta sull'host e usata internamente dal server
SERVER_PORT=8000
# Nome esatto del file GGUF presente nella cartella ./models
MODEL_FILENAME=Qwen3.5-0.8B-UD-Q8_K_XL.gguf