Getting DeepSeek-OCR working on an NVIDIA Spark via brute force using Claude Code

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Developers can now use agentic coding tools like Claude Code to autonomously get CUDA/PyTorch models running on unsupported new hardware, turning a multi-day compatibility headache into a ~40-minute supervised task.

Read this as

Simon Willison got a newly released document-reading AI model called DeepSeek-OCR working on NVIDIA's small new computer, the DGX Spark, by handing the whole problem to Claude Code, an AI assistant that can run commands. The assistant hit errors, the new chip was too new for the standard PyTorch software, but found a newer version with the right wheels and finished in about 40 minutes. It then scanned a newspaper page into editable text. This shows non-experts delegating fiddly hardware setup work to AI agents.

Willison demonstrates a workflow with cost and productivity implications: one long prompt plus three short ones, run with full permissions inside a Docker sandbox, got a brand-new 6.6GB DeepSeek-OCR model running on NVIDIA's DGX Spark (its GB10 chip is too new for PyTorch 2.5.1). Total elapsed time was under 40 minutes with 5-10 minutes of human involvement. The pattern, sandboxed agents with append-only notes files, is a practical template for offloading environment and compatibility debugging, though he had not verified all the generated notes for errors.

DeepSeek-OCR (6.6GB, PyTorch/CUDA) failed on DGX Spark because its GB10 GPU needs sm_121 compute capability, unsupported by PyTorch 2.5.1, and the model has hardcoded .cuda() calls. The fix was installing PyTorch 2.9.0 aarch64 wheels with CUDA 13.0 support, which reduces the sm_121 mismatch to a warning. On a 3503×1668px test image, prompt modes took 9-58 seconds: grounding produced coordinates but whitespace output; Free OCR produced clean text (2257 tokens, 24s); Markdown took 39s. Full setup ran in a CUDA 13.0.1 Docker container under --dangerously-skip-permissions.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

DeepSeek-OCR Claude Code NVIDIA DGX Spark PyTorch 2.9.0 GB10 GPU Docker

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading