-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into onramp-rework-env
- Loading branch information
Showing
5 changed files
with
77 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
codellama:7b-python | ||
codellama:latest | ||
dolphin-mistral:latest | ||
dolphin-mixtral:latest | ||
dolphincoder:latest | ||
llama2:13b-chat | ||
llama2:chat | ||
llama2:latest | ||
mistral:latest | ||
mixtral:latest | ||
nomic-embed-text:latest | ||
openhermes:latest | ||
sqlcoder:latest | ||
stable-code:latest | ||
tinydolphin:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/bash | ||
|
||
file="etc/ollama/Ollamamodels" | ||
parallel=false | ||
|
||
# Parse command line arguments | ||
while [[ $# -gt 0 ]]; do | ||
key="$1" | ||
case $key in | ||
--parallel) | ||
parallel=true | ||
shift | ||
;; | ||
*) | ||
shift | ||
;; | ||
esac | ||
done | ||
|
||
# Check if the Ollamamodels file exists | ||
if [ ! -f "$file" ]; then | ||
echo "Error: $file not found." >&2 | ||
exit 1 | ||
fi | ||
|
||
# Count the total number of models | ||
total_count=$(wc -l < "$file") | ||
|
||
index=1 | ||
while read -r line; do | ||
# Skip empty lines and lines starting with or containing only spaces | ||
if [[ -z "$line" || "$line" =~ ^[[:space:]]+$ || "$line" == "#"* ]]; then | ||
continue | ||
fi | ||
|
||
echo "Pulling model ($index/$total_count) $line" | ||
if $parallel; then | ||
docker exec ollama ollama pull "$line" & | ||
else | ||
docker exec ollama ollama pull "$line" | ||
fi | ||
|
||
index=$((index + 1)) | ||
done < "$file" | ||
|
||
# Wait for all the docker exec commands to finish | ||
wait |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters