feat: initial commit

This commit is contained in:
2026-08-29 13:17:59 +02:00
commit 142f5f5759
91 changed files with 6155 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
# Backendy LLM uruchamiane kontenerowo. Sterowane profilami, żeby jeden plik
# obsłużył kilka wariantów i żeby `docker compose up` bez profilu nic nie robił.
#
# docker compose --profile vllm-gpu up -d # Linux + NVIDIA
# docker compose --profile ollama up -d # awaryjnie, obie platformy
#
# Zwykle nie wywołujesz tego wprost - robi to `task llm:up`.
name: agentic-codemod-llm
services:
vllm:
profiles: ["vllm-gpu"]
image: vllm/vllm-openai:${VLLM_IMAGE_TAG:-latest}
command: >
--model ${LLM_SERVE_MODEL:-Qwen/Qwen3-4B-Instruct-2507}
--max-model-len=16384
--enable-auto-tool-choice
--tool-call-parser=hermes
--gpu-memory-utilization=${VLLM_GPU_UTIL:-0.90}
ports:
- "${LLM_PORT:-8000}:8000"
volumes:
# Cache modeli poza kontenerem - restart nie oznacza ponownego pobierania.
- ${HF_CACHE:-${HOME}/.cache/huggingface}:/root/.cache/huggingface
environment:
HUGGING_FACE_HUB_TOKEN: ${HUGGING_FACE_HUB_TOKEN:-}
# vLLM używa pamięci dzielonej do komunikacji między workerami
ipc: host
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
healthcheck:
test: ["CMD-SHELL", "python3 -c \"import urllib.request;urllib.request.urlopen('http://localhost:8000/health')\""]
interval: 15s
timeout: 5s
retries: 40
start_period: 300s
restart: unless-stopped
ollama:
profiles: ["ollama"]
image: ollama/ollama:${OLLAMA_IMAGE_TAG:-latest}
ports:
- "${OLLAMA_PORT:-11434}:11434"
volumes:
- ollama-models:/root/.ollama
healthcheck:
test: ["CMD-SHELL", "ollama list >/dev/null 2>&1"]
interval: 10s
timeout: 5s
retries: 30
start_period: 30s
restart: unless-stopped
volumes:
ollama-models: