sudo apt-get update
sudo apt upgrade
sudo apt-get install ca-certificates curl gnupg lsb-release
curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"
apt-get install docker-ce docker-ce-cli containerd.i
docker -v
vi /etc/docker/daemon.json
{
"registry-mirrors":
[
"https://docker.mirrors.ustc.edu.cn",
"https://hub-mirror.c.163.com",
"https://docker.m.daocloud.io",
"https://ghcr.io",
"https://mirror.baidubce.com",
"https://docker.nju.edu.cn"
]
}
sudo systemctl daemon-reload
sudo systemctl restart docker
curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey \
| sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg
curl -s -L https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list \
| sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' \
| sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
sudo apt-get update
sudo apt-get install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
docker pull ollama/ollama:latest
docker pull dhub.kubesre.xyz/ollama/ollama:latest
docker run -d --gpus=all --restart=always -v /root/project/docker/ollama:/root/project/.ollama -p 11434:11434 --name ollama ollama/ollama
docker run -d --gpus=all -e OLLAMA_KEEP_ALIVE=-1 -v /root/docker/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker exec -it ollama ollama run qwen2
模型 | 参数数量 | 大小 | 下载方式 |
---|---|---|---|
Llama 2 | 7B | 3.8GB | docker exec -it ollama ollama run llama2 |
Mistral | 7B | 4.1GB | docker exec -it ollama ollama run mistral |
Dolphin Phi | 2.7B | 1.6GB | docker exec -it ollama ollama run dolphin-phi |
Phi-2 | 2.7B | 1.7GB | docker exec -it ollama ollama run phi |
Neural Chat | 7B | 4.1GB | docker exec -it ollama ollama run neural-chat |
Starling | 7B | 4.1GB | docker exec -it ollama ollama run starling-lm |
Code Llama | 7B | 3.8GB | docker exec -it ollama ollama run codellama |
Llama 2 Uncensored | 7B | 3.8GB | docker exec -it ollama ollama run llama2-uncensored |
Llama 2 | 13B | 7.3GB | docker exec -it ollama ollama run llama2:13b |
Llama 2 | 70B | 39GB | docker exec -it ollama ollama run llama2:70b |
Orca Mini | 3B | 1.9GB | docker exec -it ollama ollama run orca-mini |
Vicuna | 7B | 3.8GB | docker exec -it ollama ollama run vicuna |
LLaVA | 7B | 4.5GB | docker exec -it ollama ollama run llava |
Gemma | 2B | 1.4GB | docker exec -it ollama ollama run gemma:2b |
Gemma | 7B | 4.8GB | docker exec -it ollama ollama run gemma:7b |
docker run -d -p 15027:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.nju.edu.cn/open-webui/open-webui:main
docker run -d -p 15027:8080 --gpus all --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.nju.edu.cn/open-webui/open-webui:cuda