| title | description | tags | |||||||
|---|---|---|---|---|---|---|---|---|---|
dots.ocr CUDA13 Full Environment Setup Guide |
Ubuntu + CUDA 13.0 + PyTorch 2.9.0 + flash-attn 2.8.0.post2 — 完全再現可能なAI OCR環境の構築手順 |
|
完全再現可能な dots.ocr (OCR + Transformer) 開発環境を
Ubuntu 24.04 + CUDA 13.0 + Python 3.13 + PyTorch 2.9.0 + flash-attn 2.8.0.post2
構成で構築するための手順です。
RTX 5090 など最新GPU環境で検証済み。
cd ~/workspace
git clone https://github.com/your-org/dots.ocr.git
cd dots.ocr※ プライベートリポジトリの場合は SSH URL に置き換えてください。
wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update -y
sudo apt install -y cuda-toolkit-13-0 libcudnn9-dev-cuda-13 libnccl2 libnccl-dev libnvshmem3-cuda-13 libnvshmem3-dev-cuda-13echo 'export PATH=/usr/local/cuda-13.0/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda-13.0/lib64:/usr/lib/x86_64-linux-gnu/nvshmem/13:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
sudo ldconfigcurl -LsSf https://astral.sh/uv/install.sh | sh
chmod +x generate_env_files.sh
./generate_env_files.sh
chmod +x setup.sh
./setup.shuv venv .venv
source .venv/bin/activate
uv pip install setuptools wheel packaging psutil typing_extensions
uv pip sync requirements.txt --no-build-isolation --preview-features extra-build-dependenciessource .venv/bin/activate
python -c "import torch, flash_attn; print('✅ flash-attn OK'); print('CUDA:', torch.version.cuda, '→', torch.cuda.is_available())"✅ 出力例:
✅ flash-attn OK
CUDA: 13.0 → True
| ファイル | 説明 |
|---|---|
setup.sh |
CUDA + Python 環境を自動構築 |
generate_env_files.sh |
requirements.txt と pyproject.toml を自動生成 |
Dots Ocr Cuda13 Setup.md |
このガイド |
.venv/ |
uv による仮想環境 |
| エラー | 対応 |
|---|---|
libcudnn.so.9 not found |
sudo apt install libcudnn9-dev-cuda-13 |
libcusparseLt.so.0 not found |
sudo apt install cuda-libraries-13-0 |
libnvshmem_host.so.3 not found |
sudo apt install libnvshmem3-cuda-13 libnvshmem3-dev-cuda-13 |
No module named 'psutil' |
uv pip install psutil |
No module named 'typing_extensions' |
uv pip install typing_extensions |
| コンポーネント | バージョン |
|---|---|
| Ubuntu | 24.04 |
| CUDA | 13.0.2 |
| cuDNN | 9.14 |
| PyTorch | 2.9.0+cu130 |
| flash-attn | 2.8.0.post2 |
| Python | 3.13.7 |
| GPU | RTX 5090 (32GB VRAM) |
📦 dots_ocr_cuda13_setup_bundle.zip
展開後に以下を実行:
./generate_env_files.sh
./setup.shMasato Fujii / CDLabs AI Security Project
(with ChatGPT GPT-5, October 2025)