Delete previous model if exists

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2024-07-01 17:22:44 +05:30
parent e8f73063d0
commit 3dcb3ce021
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -4,8 +4,10 @@
/ollama/ollama serve &
echo "FROM /models/$MODEL_NAME" > /tmp/Modelfile
/ollama/ollama create -f /tmp/Modelfile model
if [ -n "$INIT_MODELS" ]; then
/ollama/ollama rm model || true
echo "FROM /models/$MODEL_NAME" > /tmp/Modelfile
/ollama/ollama create -f /tmp/Modelfile model
fi
exec $@