first commit
Cette révision appartient à :
18
Services/llamacpp/entrypoint.sh
Fichier normal
18
Services/llamacpp/entrypoint.sh
Fichier normal
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
CONFIG_FILE="/app/config.yaml"
|
||||
PRESET_FILE="/app/config.preset.yaml"
|
||||
|
||||
echo "Checking configuration..."
|
||||
|
||||
# Se il file non esiste o è vuoto o non contiene 'models:', usa il preset
|
||||
if [ ! -f "$CONFIG_FILE" ] || [ ! -s "$CONFIG_FILE" ] || ! grep -q "models:" "$CONFIG_FILE" 2>/dev/null; then
|
||||
echo "Config file missing, empty, or invalid. Copying from preset..."
|
||||
cp "$PRESET_FILE" "$CONFIG_FILE"
|
||||
echo "Config file populated from preset."
|
||||
else
|
||||
echo "Config file found and valid."
|
||||
fi
|
||||
|
||||
exec /app/llama-swap -config "$CONFIG_FILE" -listen :8080
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur