DEV Community

Cover image for How to Run DeepSeek R1 Locally on Your PC
Chemical Engineer
Chemical Engineer

Posted on

How to Run DeepSeek R1 Locally on Your PC

Running AI models locally on your computer might sound intimidating, but with the right steps, it’s surprisingly straightforward. In this guide, I'll walk you through how you can set up China's DeepSeek R1 AI model on your Windows PC, completely offline. Whether you're exploring AI or just curious about running large language models (LLMs) at home, this tutorial lays out every step in an easy-to-follow way.

What You’ll Need

Before diving in, here’s what you’ll need:

  • A Windows PC with reasonable specs (better hardware means better performance).
  • An internet connection for downloads (you can unplug later to test offline functionality).
  • Patience while software installs do their thing.

Downloading DeepSeek and Ollama

The first step is enabling your computer to handle LLMs. To do this, you’ll be using Ollama, a tool that makes it easier to run models like DeepSeek R1 on your PC.

  1. Open your browser and search for "Ollama download." Navigate to their official site and download the installer.

Ollama Offical Website Page

  1. While it’s downloading, visit the DeepSeek R1 page to select the version of the model you’d like to use. Smaller versions are easier to run but might have fewer features, while larger ones are more powerful but require stronger hardware. For this guide, let's pick the 7-billion parameter version.
  2. Copy the command provided on the DeepSeek R1 site—this will let Ollama install and configure the model.

Ollama deepseek model

After downloading the Ollama installer:

  • Go to your Downloads folder and open the Ollama setup file. Follow the prompts to install it.
  • Once installed, Ollama will run quietly in your system tray, ready to handle the DeepSeek model.

Setting Up DeepSeek R1

Now it’s time to connect everything.

  1. Open the Start menu and search for PowerShell—don’t be intimidated by its text-based interface!
  2. Paste the command you copied from the DeepSeek site into PowerShell and hit Enter. This will start the download and setup process for DeepSeek R1.

Power Shell Command Image for deepseek model

Depending on your PC and internet speed, this might take a while. Once completed, PowerShell will confirm that the model is ready to use, and you can begin interacting with DeepSeek.

screenshot of commands in Power Shell

Try typing in a message or question to see how it responds. Keep in mind, running large models on a personal computer can be slower compared to cloud-based services.


Improving the Interface with Docker

Let’s address the elephant in the room: the default black-box-style interface isn’t exactly user-friendly. To get a more polished experience, you’ll need to use Docker, a tool that simplifies application management and provides a slick web-based interface.

  1. Download Docker from its official website. Choose the version for your operating system.

  2. Install Docker by following the instructions in the setup process. When prompted, restart your PC to complete the installation.

  3. Once your computer restarts, open Docker, create an account, and log in.

Next, search online for instructions to start the "Open Web UI container" for Docker. You'll find a command on most setup guides—copy the one suited for your computer. If you have an Nvidia GPU, there’s often a separate command for improved GPU performance.

  • Open PowerShell, paste the Docker command, and hit Enter.
  • Allow any permissions requested by Docker to let it run properly.

One extra step: enable Windows Virtual Machine Platform. This ensures Docker operates without issues:

  • Search for "Windows Features" from the Start menu.
  • Find and enable the checkbox for Virtual Machine Platform.
  • Restart your PC when prompted.

Using DeepSeek R1 Locally

With everything set up, here’s how to use DeepSeek R1 offline through the web-based interface Docker provides:

  1. Open Docker and find the "container" you just set up. Click on it to start your DeepSeek system.
  2. You’ll then see a login page for the AI interface. Create an account if needed, log in, and start interacting with the model.

You can unplug your PC’s internet cable to test DeepSeek R1 completely offline. While responses might take a little longer compared to cloud platforms, they’re fully powered by your computer.


Uninstalling Everything

Not ready to keep all these tools on your PC? Here’s how to clean up:

  1. Go to the Start menu, search for Control Panel, and select Programs and Features. Uninstall both Docker and Ollama from the list.
  2. DeepSeek’s model files still take up space on your hard drive. To remove them:
    • Open File Explorer and navigate to C:\Users[Your Username].
    • Delete the "Docker" and "Ollama" folders.

If you notice a little penguin icon in File Explorer (linked to the Windows Subsystem for Linux), you’ll need to:

  • Go back to Windows Features via the Start menu.
  • Disable Windows Subsystem for Linux.
  • Restart your computer to complete the process.

And just like that, everything is back to normal!


Conclusion

Running DeepSeek R1 locally might sound complicated, but once you've followed these steps, it's a breeze. With Ollama, Docker, and a bit of configuration, you can experiment with AI directly on your PC—no data centers or external servers required. Whether you're curious about AI capabilities or just want to see what the buzz is about, this guide helps you get started. And if you ever decide it’s not for you, uninstalling is just as straightforward.

Give it a try and see what DeepSeek R1 can do!

Top comments (0)