Open4

DeepSeek OCR in WSL

Toshimitsu TakahashiToshimitsu Takahashi

Install CUDA Toolkit

https://developer.nvidia.com/cuda-downloads?target_os=Linux&target_arch=x86_64&Distribution=WSL-Ubuntu&target_version=2.0&target_type=deb_network

wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-13-0

For more details about cuDNN JIT and how it compares to cuDNN FULL, please see here.

To install for CUDA 13, perform the above configuration but install the CUDA 13 specific package:

sudo apt-get -y install cudnn9-cuda-13
Toshimitsu TakahashiToshimitsu Takahashi
git clone https://github.com/deepseek-ai/DeepSeek-OCR.git
cd DeepSeek-OCR
python3 -m venv .venv --system-site-package
source .venv/bin/activate
pip3 install -r requirements.txt
pip install flash-attn --no-build-isolation

requirements.txt

transformers
tokenizers
PyMuPDF
img2pdf
einops
easydict
addict
Pillow
numpy