赞
踩
docker run -d -v /opt/ai/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
其他系统请参考:英伟达官方文档
# 1.配置apt源
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
# 2.更新源
sudo apt-get update
# 3.安装工具包
sudo apt-get install -y nvidia-container-toolkit
docker run --gpus all -d -v /opt/ai/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
docker run -d -p 8080:8080 -add-host=host.docker.internal:host-gateway -name ollama-webui -restart always ghcr.io/ollama-webui/ollama-webui:main
docker exec -it ollama ollama run qwen:4b-chat
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。