https://hub.docker.com/r/ollama/ollama
https://github.com/ollama/ollama
https://ollama.ai/
# one-api - OpenAI接口管理和分发系统
https://abc.htmltoo.com/thread-46823.htm
# ollamaui - Ollama WebUI
https://abc.htmltoo.com/thread-46894.htm
# huggingface - 拉取模型大文件
https://abc.htmltoo.com/thread-46886.htm
docker run -d --name ollama --hostname ollama -p 11434:11434 --restart=always --network mgr --ip 172.18.0.34 -v /etc/localtime:/etc/localtime:ro --privileged=true --user=root -e TZ='Asia/Shanghai' --ulimit nofile=262144:262144 -e OLLAMA_ORIGINS='*' -e OLLAMA_HOST='0.0.0.0' -v /data/file:/data/file/ -v /data/file/soft/ollama:/root/.ollama hub.htmltoo.com:5000/bigdata:ollama-0.3.12
- gpus
docker run -d --name ollamalabs --hostname ollama --restart=always --gpus=all --network mgr --ip 172.18.0.34 -v /etc/localtime:/etc/localtime:ro --privileged=true --user=root -e TZ='Asia/Shanghai' --ulimit nofile=262144:262144 -e OLLAMA_ORIGINS='*' -e OLLAMA_HOST='0.0.0.0' -v /data/file:/data/file/ -v /data/file/soft/ollama:/root/.ollama hub.htmltoo.com:5000/bigdata:ollama-0.3.12
http://ai.htmltoo.com/
-
http://172.18.0.34:11434
#
docker run -d --name ollamalabs --hostname ollama --restart=always -v /data/file:/data/file/ ollama/ollama:0.3.12
docker commit -m="update" -a="htmltoo.com" ollamalabs hub.htmltoo.com:5000/bigdata:ollama-0.3.12
docker push hub.htmltoo.com:5000/bigdata:ollama-0.3.12
docker save hub.htmltoo.com:5000/bigdata:ollama-0.3.12 | gzip > /data/site/htmltoo.f/htmltoo.up/soft/docker.tar/ollama-0.3.12.tar.gz
docker load < /opt/ollama-0.3.12.tar.gz
-算力
--gpus=all
-版本
ollama -v
-内存
至少有8 GB内存可用于运行7B型号,16 GB内存可用于运行13B型号,32 GB内存可用于运行33B型号。
-
docker exec -it ollama /bin/bash
docker exec -it ollamalabs /bin/bash
apt-get install -y wget vim net-tools curl git iproute2 procps telnet inetutils-ping zip unzip
apt-get install -y ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo Asia/Shanghai > /etc/timezone;
# List models on your computer
---list
ollama list
ollama run llama3.2
ollama run gemma2:9b
ollama run qwen2.5:14b
ollama run qwen2.5:7b
ollama run qwen2.5-coder:7b
ollama run phi3.5:latest
ollama run qwen2.5:0.5b
ollama run minicpm-v:8b-2.6-q8_0
ollama run sqlcoder:7b-q8_0
ollama run quentinz/bge-large-zh-v1.5:latest
ollama run longwriter-llama3.1:8b-q8
ollama run phi3.5-vision:8b-q8
ollama run llama3.1:8b-cn
ollama run gemma-writer:9b-q8
---embedding
ollama run quentinz/bge-large-zh-v1.5
---
ollama run yi-coder:9b-chat-q8_0
ollama run starcoder2:7b
ollama run phi3.5:3.8b-mini-instruct-q8_0
# 删除模型
ollama rm llama2:70b
# Example using curl:
curl -X POST http://localhost:11434/api/generate -d '{
"model": "llama2",
"prompt":"Why is the sky blue?"
}'
# 不同模型
https://ollama.ai/library
| Model | Parameters | Size | Download |
|---|
| Mistral | 7B | 4.1GB | ollama run mistral |
| Llama 2 | 7B | 3.8GB | ollama run llama2 |
| Code Llama | 7B | 3.8GB | ollama run codellama |
| Llama 2 Uncensored | 7B | 3.8GB | ollama run llama2-uncensored |
| Llama 2 13B | 13B | 7.3GB | ollama run llama2:13b |
| Llama 2 70B | 70B | 39GB | ollama run llama2:70b |
| Orca Mini | 3B | 1.9GB | ollama run orca-mini |
| Vicuna | 7B | 3.8GB | ollama run vicuna |
-GGUF model
https://huggingface.co/models?search=gguf
gguf video chinese
# 对话中文微调参数模型
ollama run llama2-chinese:13b-chat-fp16
# 代码生成模型
ollama run starcoder
# 专为聊天和代码生成而设计
ollama pull open-orca-platypus2
# 优秀代码生成模型
ollama run codeup
# 用于摘要、文本生成和聊天机器人
ollama run falcon
# 使用文本提示来生成和讨论代码的大型语言模型
ollama run codellama
# 双语基础模型
ollama run yi:34b-q6_K
Ctrl-D or /bye to exit
rm -rf /data/site/docker/data/ollama/models/*
# Customize a model
FROM ./vicuna-33b.Q4_0.gguf
ollama create example -f Modelfile
ollama run example
# CLI Reference
ollama create mymodel -f ./Modelfile
ollama pull llama2
# Copy a model
ollama cp llama3.1 my-model
# Install
curl -fsSL https://ollama.com/install.sh | sh