目录

2025/2/27 大鹿 @平湖 By Endeavour OS

安装Ollama

下载DeepSeek模型

    不可用:ollama pull deepseek
    ollama run deepseek-r1(安装和运行都是这个命令)
    # 默认7b,约4.7G,参考:https://ollama.com/library/deepseek-r1

运行DeepSeek模型

配置为系统服务(可选)

    [Unit]
    Description=Ollama DeepSeek Service
    After=network.target

    [Service]
    ExecStart=/usr/bin/ollama run deepseek
    Restart=always
    User=your-username

    [Install]
    WantedBy=multi-user.target
    sudo systemctl enable ollama-deepseek.service
    sudo systemctl start ollama-deepseek.service

验证部署

    systemctl status ollama-deepseek.service

使用DeepSeek

    curl http://localhost:11434/api/generate -d '{
      "model": "deepseek",
      "prompt": "Hello, how are you?"
    }'

结束