diff --git a/Dockerfile b/Dockerfile index 32aaa3d..82c05c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM quay.io/go-skynet/local-ai:latest +# Utiliser bash pour les heredocs propres +SHELL ["/bin/bash", "-lc"] + ENV MODELS_PATH=/models \ DEBUG=false \ THREADS=2 \ @@ -15,16 +18,16 @@ RUN curl -L --fail --progress-bar \ -o /models/tinyllama-1.1b-chat.Q4_K_M.gguf \ https://huggingface.co/TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF/resolve/main/tinyllama-1.1b-chat-v1.0.Q4_K_M.gguf -# Mappe le nom du modèle **gpt-oss-20b** (compat) vers le fichier téléchargé -# => côté Symfony on référence simplement "gpt-oss-20b" -RUN printf "name: gpt-oss-20b +# Génère le mapping YAML du modèle exposé sous le nom "gpt-oss-20b" +RUN cat > /models/gpt-oss-20b.yaml <<'YAML' +name: gpt-oss-20b backend: llama parameters: model: tinyllama-1.1b-chat.Q4_K_M.gguf - n_ctx: %s - n_threads: %s + n_ctx: ${CONTEXT_SIZE} + n_threads: ${THREADS} temperature: 0.2 top_p: 0.9 -" "$CONTEXT_SIZE" "$THREADS" > /models/gpt-oss-20b.yaml +YAML -# L'entrée du serveur (déjà gérée par docker-compose via `command`) \ No newline at end of file +# Le démarrage du serveur est piloté par docker-compose via `command` \ No newline at end of file