Table of Contents

DeepSeek has captured public eyes for months. I decide to deploy it to our local server and make it open to remote usage.

1. Usage (For users)

There are several UI tools.

1.1 Initial test

Type http://101.6.122.12:11434 in your remote device. You should see "Ollama is running", otherwise there are something wrong.

1.2 Use ChatBox

REF ChatBox provide a client and a web. Download the client and install it.

That's all. Chat with deepseek. You may begin with a "Hello, DeepSeek".

The response may be slow for the first time, since it take some time to wake the model. (冷启动和热启动的区别)

1.3 VSCode

VSCode, along with extension Continue, supports local LLM usage. However, the experience is bad.

I put the configuration file config.json below for convience.

{
  "models": [
    {
      "title": "deepseek-r1:32b",
      "model": "deepseek-r1:32b",
      "provider": "ollama",
      "apiBase": "http://101.6.122.12:11434/"
    }
  ],
  "tabAutocompleteModel": {
      "title": "deepseek-r1:32b",
      "model": "deepseek-r1:32b",
      "provider": "ollama",
      "apiBase": "http://101.6.122.12:11434/"
  }
}

2. Installation (For developers only)

Broadly speaking, use software ollama to download and run the model deepseek, then open a port to make it accessible externally.

2.1 install ollama

REF For linux, download the file install.sh and run it. The software will be installed to path /usr/bin.

curl -fsSL https://ollama.com/install.sh | sh

2.2 change storage path

REF The default storage path is /usr/share, but it's a routine that we put softwares in path /home/usr/share. Thus the next step is move the storage path of ollama.

2.3 download deepseek's models

REF The "real" deepseek-r1 is the model with 671 billion parameters. Ollama distilled several models with different file sizes. For 4080 or 3090, deepseek-r1:32b is the most proper one. Smaller ones are worse in performance while bigger ones run slowly.

This is an easy while tricky step. It is easy because just a command ollama run deepseek-r1:32b works. It is tricky because the downloading may restart automatically many many times (REF). There are two ticks:

2.4 make it open to remote access

REF To make the ollama service available externally, you need to set the following two environment variables OLLAMA_HOST and OLLAMA_ORIGINS.