Isolating containers from internet access to enhance security.

This commit is contained in:
ben
2023-03-04 22:22:22 +01:00
parent f3eae794ac
commit 207592ff57
9 changed files with 53 additions and 22 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env bash
IFS=',' read -r -a models_arr <<< "${MODELS}"
## now loop through the above array
for m in "${models_arr[@]}"
do
ollama list | tail -n +2 | cut -d' ' -f1 | grep ${m} > /dev/null
if [[ $? -ne 0 ]]
then
echo "download {m}"
ollama pull "${m}"
else
echo "${m} already installed"
fi
done