Grant Internet Access to DeepSeek-R1

Grant DeepSeek R1 Internet Access

Grant Internet Access to DeepSeek-R1: A step-by-step guide.

In this guide, I’ll walk you through the process of granting internet access to DeepSeek-R1 and enhancing your language model’s capabilities using Khoj, an open-source software solution. I’ll be demonstrating the installation process using Docker on an M4 Mac Mini Pro with 24GB RAM, though these instructions can be adapted for other systems.

Video Overview

As ever, this post started out life as a video. You can watch as I get this setup on my Mac:

Pre-Requisites

Before we begin, you’ll need:

  • DeepSeek and Ollama installed – here’s my guide
  • Docker installed (default settings are fine)
  • Homebrew (recommended)
  • A basic understanding of terminal commands

Setting Up Homebrew

If you haven’t already installed Homebrew (especially useful for AI/ML work), you can do so by:

  1. Copy the installation code from the Homebrew website
  2. Paste it into your terminal
  3. Enter your password when prompted
  4. Run the additional commands provided to add Homebrew to your path

Installation Process

1. Initial Setup

First, navigate to your home directory and create a new directory for Khoj:

cd ~
mkdir .khoj
cd .khoj

2. Installing Required Tools

You’ll need wget, which can be installed via Homebrew:

brew install wget

3. Configure Docker Container

  1. Download the Docker compose file from the Khoj website
  2. Edit the docker-compose.yml file to set:
  • Admin username
  • Admin password
  • Admin email
  • Uncomment the openai_base_url

4. Building the Container

Run the following command:

docker-compose up

Note: This process typically takes 10-15 minutes depending on your internet speed.

5. Accessing Khoj

Once installation is complete:

  1. Open your browser and navigate to localhost:42110
  2. Wait for the Khoj object to be ready for use
  3. You should see the Khoj interface, though it won’t be connected to Deep Seek yet

Connecting to and Giving Internet Access to DeepSeek-R1

1. Accessing Admin Panel

  1. Navigate to the Khoj admin panel
  2. Log in using the credentials you set in the docker-compose.yml file

2. Setting Up the AI Model

  1. Go to AI Models section
  2. Add a new AI model:
  • Name it “ollama”
  • Add any placeholder text for the API key
  • Use the correct API base URL :
http://host.docker.internal:11434/v1
  • Save the configuration

3. Important Notes

  • After setting up the AI model, restart the Khoj container
  • Reload your browser
  • The chat models should now appear, including DeepSeek-R1

Creating a Research Agent

To maximize the utility of your setup:

  1. Navigate to the Agents section
  2. Create a new agent with research characteristics
  3. Select Deep Seek-R1 (I’d suggest using 7 billion parameters on a 24GB Mac as it’s a good balance of capable and speed) as your model
  4. Configure input tools and output modes as needed

Testing the Setup

To verify everything is working:

  1. Start a chat with your research agent
  2. Ask a simple factual question
  3. Observe how the system uses both online resources and the language model to generate responses
  4. Monitor GPU usage through Activity Monitor to see the system in action

Future Possibilities

This setup opens up numerous possibilities for:

  • Integration with knowledge bases
  • Custom file integration
  • Image generation capabilities
  • Automation features

Remember that Khoj is open-source and continuously evolving, so new features and capabilities may become available over time.

By following these steps, you’ll have successfully set up DeepSeek-R1 with internet access, significantly expanding its capabilities and potential applications.

No Responses

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.