This guide provides a step-by-step tutorial on how to run DeepSeek-R1 locally on your Windows 11 system. DeepSeek is an AI model recently launched by a Chinese company, making it accessible for local hosting. By following this guide, you will learn the necessary commands and configurations to set up DeepSeek-R1 without needing an internet connection, allowing you to use its distilled version efficiently.

Step 1: Install Necessary Dependencies

Before running DeepSeek-R1, ensure you have the required software installed on your machine. You will need:

  • Ollama: A command-line tool used to run the DeepSeek model.
  • Docker: Required for containerizing the application.

To install Docker, you can download it from the official Docker website and follow the installation instructions provided for Windows.

Step 2: Run the Distilled Version of DeepSeek-R1

Once you have installed the necessary dependencies, you can execute the following commands to run the distilled versions of DeepSeek-R1:

  • For the 1.5 billion parameter model, run:
  • ollama run deepseek-r1:1.5b
  • For the 14 billion parameter model, run:
  • ollama run deepseek-r1:14b

Choose the command based on the model size you wish to use. Ensure Ollama is properly set up in your PATH for these commands to work correctly.

Step 3: Set Up Docker for Open-WebUI

If you want to access the graphical interface of DeepSeek, you will need to run it in Docker. Use the following command:

docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main

This command does the following:

  • -d: Runs the container in detached mode.
  • -p 3000:8080: Maps the container’s port 8080 to your host’s port 3000.
  • -v: Creates a volume for data persistence.

You can access the web interface once the container is running by navigating to http://localhost:3000 in your web browser.

Extra Tips & Common Issues

Here are some tips and common issues you might encounter:

  • Ensure Docker Desktop is running when executing the Docker command.
  • If facing issues with Ollama, verify that it’s installed by running ollama --version.
  • Clear any existing containers if the commands fail, using docker ps -a to see running containers and docker rm [CONTAINER_ID] to remove a specific one.

Conclusion

Congratulations! You have successfully set up DeepSeek-R1 locally on your Windows 11 machine. By following the steps above, you can use this AI model offline and leverage its capabilities without an internet connection. For further exploration, consider checking out other AI-related guides or leveraging Docker for additional projects.

2025