Setting up and running DeepSeek-R1 671B with Ollama, Docker, and WebUI on Windows requires a robust hardware setup, proper software configuration, and careful optimization. Follow this step-by-step guide to deploy it effectively.
Prerequisites
1. Hardware Requirements
Ensure your system meets the minimum hardware requirements for DeepSeek-R1 671B:
- CPU: High-end multi-core processor (AMD Threadripper / Intel Xeon)
- RAM: 1TB+ DDR5 ECC
- GPU: Multi-GPU setup, such as:
- 20x Nvidia RTX 3090 (24GB each)
- 10x Nvidia RTX A6000 (48GB each)
- Storage: At least 10TB+ NVMe SSD
- Power & Cooling: Sufficient power supply and cooling solutions for multi-GPU operation
2. Install Required Software
Step 1: Install Docker Desktop on Windows
- Download Docker Desktop from Docker’s official site.
- Enable WSL 2 integration during installation.
- Verify installation by running:
docker --version
- Make sure your system meets the Docker resource requirements (allocate at least 512GB RAM & multiple GPUs in Docker settings).
Step 2: Install Ollama
- Download and install Ollama from Ollama’s official site.
- Verify the installation:
ollama --version
Step 3: Pull the DeepSeek-R1 671B Model
- Pull the DeepSeek-R1 model using Ollama:
ollama pull deepseek-r1:671b
Step 4: Install WebUI for DeepSeek-R1
- Clone the DeepSeek WebUI repository:
git clone https://github.com/deepseek-ai/webui.git
cd webui
- Build and run WebUI inside Docker:
docker build -t deepseek-webui .
docker run --gpus all -p 7860:7860 -v deepseek_cache:/root/.cache deepseek-webui
3. Running DeepSeek-R1 671B
Option 1: Run Using Ollama
ollama run deepseek/deepseek-r1-671b
Option 2: Run with WebUI
- Open your browser and navigate to:
http://localhost:7860
- Start interacting with DeepSeek-R1 671B via the web interface.
4. Optimizations for Performance
- Enable CUDA & TensorRT: Ensure NVIDIA CUDA & TensorRT are installed for better GPU acceleration.
- Allocate More RAM to Docker: Modify Docker settings to allocate at least 512GB RAM.
- Use Multi-GPU Scaling: Leverage NVIDIA NCCL for better scaling across multiple GPUs.
- Enable Shared Memory in Docker: Use
--shm-size=512g
to increase shared memory:
docker run --gpus all --shm-size=512g -p 7860:7860 deepseek-webui
Conclusion
You have now set up DeepSeek-R1 671B on Windows using Ollama, Docker, and WebUI. This setup ensures a seamless AI model deployment while leveraging your hardware efficiently.