logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt
How to install deepseek-ai/DeepSeek-OCR. Official installation instructions. Project installation guide. Framework or library installation. Build installation instructions. How to setup and install from GitHub. Installation steps and setup instructions. Official docs and installation instructions GitHub.

deepseek-ai/DeepSeek-OCR Installation Guide

How to install deepseek-ai/DeepSeek-OCR. Official project installation instructions and setup guide.

Automated Install (Recommended)

Quick installation instructions for deepseek-ai/DeepSeek-OCR. This is the fastest way to complete project installation and setup.

Install via curl

curl -fsSL https://hexmos.com/ipm-install | bash && 
ipm i deepseek-ai/DeepSeek-OCR
or

Install via npx

npx @hexmos/ipm i deepseek-ai/DeepSeek-OCR

Prerequisites

Conda

package_manager

Required for environment management and python versioning.

CUDA

system_tool

Version: 11.8

NVIDIA GPU with CUDA 11.8 support is required for optimal performance.

Git

system_tool

Used to clone the repository.

Manual Installation Methods

Manual installation instructions. How to install from GitHub source.

Conda Environment Setup (vLLM & Transformers)

git clone https://github.com/deepseek-ai/DeepSeek-OCR.git

cd DeepSeek-OCR

conda create -n deepseek-ocr python=3.12.9 -y && source activate deepseek-ocr

pip install torch==2.6.0 torchvision==0.21.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cu118

pip install https://github.com/vllm-project/vllm/releases/download/v0.8.5/vllm-0.8.5+cu118-cp312-cp312-manylinux1_x86_64.whl

pip install -r requirements.txt

pip install flash-attn==2.7.3 --no-build-isolation

Post Installation Steps

  • To run vLLM image inference: Navigate to `DeepSeek-OCR/DeepSeek-OCR-vllm` and run `python run_dpsk_ocr_image.py`.
  • To run Transformers inference: Navigate to `DeepSeek-OCR/DeepSeek-OCR-hf` and run `python run_dpsk_ocr.py`.
  • Ensure you have edited `config.py` in the vllm directory to set your input/output paths.
  • Download model weights from Hugging Face if you are not using the automated downloader in the scripts.