#! /usr/bin/env bash sleep 10 if [ -n "$INIT_MODELS" ]; then /app/ollama rm model || true echo "FROM /models/$MODEL_NAME" > /tmp/Modelfile echo "PARAMETER temperature 1" >> /tmp/Modelfile echo "PARAMETER num_ctx 8192" >> /tmp/Modelfile echo 'TEMPLATE """{{ if .Prompt }}user' >> /tmp/Modelfile echo "{{ .Prompt }}" >> /tmp/Modelfile echo "{{ end }}model" >> /tmp/Modelfile echo "{{ .Response }}" >> /tmp/Modelfile echo '"""' >> /tmp/Modelfile /app/ollama create -f /tmp/Modelfile model fi /app/ollama run model