[Linux] PaddlePaddle with GPU on DGX Spark

Abstract

One of the most powerful OCR engines available as open source is PaddlePaddle. Sadly, Paddle is only available on ARM64 (aarch64) with CPU support. No binaries are provided for ARM64 with GPU support. Thus, running PaddlePaddle on an NVIDIA DGX Spark won’t make use of its powerful Blackwell GPU.

The only way currently available is to compile PaddlePaddle for CUDA 13.0 on an NVIDIA DGX Spark manually. As manual compiling often comes with hurdles, I will try to briefly address the compiling process in the following article.

As of Q1/2026 the DGX Spark is preinstalled with an NVIDIA branded version of Ubuntu 24.04 for ARM64 dubbed DGX OS 7.

Recommendations

I. AI Support for help compiling process
While all LLMs have pro’s and con’s, I had best results in this specific case with Anthropic’s Claude. It guided me through some issues in Step 8 and Step 9. Support provided by ChatGPT or Gemini didn’t bring me on the right track.

II. Machine needs to have latest updates
Furthermore, have all updates installed and have had a fresh reboot. Have no kernel or firmware update pending. Just don’t.

Step 1. Check this

$ uname -m          # is aarch64, right?
$ nvcc --version    # CUDA 13.0 (or 12.9+)
$ nvidia-smi        # GB10, Compute Capability 12.1
$ python3 --version # 3.10–3.12 recommended

Step 2. Dependencies

$ sudo apt-get update
$ sudo apt-get install -y \
git cmake ninja-build \
python3-dev python3-pip python3-venv \
libopenblas-dev liblapack-dev \
gfortran patchelf swig \
wget curl unzip \
libssl-dev zlib1g-dev
$ pip3 install cython wheel setuptools numpy protobuf

Step3: Check for CUDA 13.0 Toolkit for SBSA/aarch64

$ dpkg -l | grep cuda-toolkit

If not installed, install via apt on DGX OS:
$ sudo apt-get install cuda-toolkit-13-0

Step 4. Python Venv for Paddle Compiling

Create a python virtual environment for the compilation process.

$ python3 -m venv paddle_env

Activate and start the virtual environment

$ source ~/paddle_env/bin/activate

Step 5: Install Build-Dependencies into Venv for Paddle Compiling

(paddle_env)$ pip install --upgrade pip
(paddle_env)$ pip install numpy protobuf cython wheel setuptools

Verify with:

(paddle_env)$ which python3 # must show ~/paddle_env/bin/python3                            # NOT /usr/bin/python3
(paddle_env)$ python3 --version    # 3.12.3(paddle_env)$ pip --version        # pip xx.x from ~/paddle_env/...

Step 6. Clone PaddlePaddle Source

(paddle_env)$ cd ~
(paddle_env)$ git clone https://github.com/PaddlePaddle/Paddle.git
(paddle_env)$ cd Paddle

Current Stable-Branch (3.x)
(paddle_env)$ git checkout develop # or git checkout v3.3.0

Submodules
(paddle_env)$ git submodule update --init --recursive

Verify

(paddle_env)$ ls ~/Paddle
(paddle_env)$ git log --oneline -3

Step 7. Install Packaging

(paddle_env)$ pip install -r ~/Paddle/python/requirements.txt

Step 8. This is nasty part A
It took many attempts, because “Eigen” gave errors during compilation. This flag eventually worked: DCMAKE_CUDA_FLAGS=”-U__ARM_NEON -DEIGEN_DONT_VECTORIZE=1″.

(paddle_env)$ cd ~/Paddle/build

As known, this cmake also creates a log file (“cmake_output.log”) that helps a lot when determining reasons for errors. Nowadays AI-LLMs are very helpful for analysing in case anything goes south.

(paddle_env)$ cmake .. \    -GNinja \
    -DCMAKE_BUILD_TYPE=Release \
    -DWITH_GPU=ON \
    -DWITH_TESTING=OFF \
    -DCUDA_ARCH_NAME=Manual \
    -DCUDA_ARCH_BIN="12.1" \
    -DWITH_ARM=ON \
    -DWITH_AVX=OFF \
    -DWITH_MKL=OFF \
    -DWITH_MKLDNN=OFF \
    -DWITH_TENSORRT=OFF \
    -DCMAKE_CUDA_FLAGS="-U__ARM_NEON -DEIGEN_DONT_VECTORIZE=1" \
    -DPYTHON_EXECUTABLE=$(which python3) \
    2>&1 | tee cmake_output.log

Step 9. This is nasty part II
in case everything went well, you can you start compiling:
(paddle_env)$ ninja -j$(nproc) 2>&1 | tee build_output.log

This compiling process took about 40mins on my DGX

Step 10. Install DGX compatible PaddlePaddle wheel to your working Venv

Leave the compilation Venv (deactivate) and activate your desired working Venv (!!!!) Don’t use the compilation Venv for working purposes and neither use your working Venv as a compilation Venv.

Deactivate your compiling Venv and start your working Venv
(paddle_env)$ deactivate
$ source /your_working_venv/bin/activate

Install PaddleOCR core library, dependencies and the CLI tool (paddleocr). PaddleOCR by default installs only the CPU version on a DGX-Spark as a GPU version (paddlepaddle-gpu) is not (yet) provided for ARM64.

(your_working_venv)$ pip install paddleocr #installs core library, dependencies and CLI tool.

Now install your freshly compiled PaddlePaddle wheel to your desired Venv.
(your_working_venv)$
pip install ~/Paddle/build/python/dist/paddlepaddle_gpu-3.4.0.dev20260405-cp312-cp312-linux_aarch64.whl

Lemme know, if it helps…

[Covid-19] Germany’s current COVID-19 crisis mainly driven by unvaccinated people

Quote: “Here, we estimate that about 67%–76% of all new infections are caused by unvaccinated individuals, implying that only 24%–33% are caused by the vaccinated. Furthermore, we estimate 38%–51% of new infections to be caused by unvaccinated individuals infecting other unvaccinated individuals. In total, unvaccinated individuals are expected to be involved in 8–9 of 10 new infections.”

Maier, B. F., Wiedermann, M., Burdinski, A., Klamser, P., Jenny, M. A., Betsch, C. & Brockmann, D. (2021). Germany’s current COVID-19 crisis is mainly driven by the unvaccinated. medRxiv. https://doi.org/10.1101/2021.11.24.21266831

[Win] Integrate iPhone-Calling into Windows

Regular switchers know about the ability of macOS to be used to connect to the iPhone in order to place calls. This functionality was long not avalailabe to Windows users, since Microsoft decided to better support Android.

A company named In The Hand Ltd. now bridged this gap and developed a tool named “Thy Phone”. It seemless integrates into Windows and comes with a clear and easy to understand interface. Using my beloved EM-Client allows to place calls directly from the contacts lists into Thy Phone. Nice and handy… One of the best 3.59EUR, I’ve invested in a long time…

Get Thy Phone on the Microsoft Store

[Covid-19] Schnelltests und die Omikron-Variante

Das Handelsblatt widmet sich der Frage, welche Antigen-Schnelltests die neuste Corona-Variante namens “Omikron” erkennen können. Mit Verweis auf Sandra Cieseks Tweet sind offenbar die Tests von Roche, Siemens und Flowflex zuverlässig in der Erkennung der Omikron-Variante.

Telgheder, M. (2021, 1. Dezember). Covid-19-Antigen-Schnelltests: Wie sicher sind die Ergebnisse von Schnelltests? Handelsblatt. Abgerufen am 4. Dezember 2021, von https://www.spektrum.de/news/welche-corona-schnelltests-sind-zuverlaessig/1954489

Ciesek, S. [CiesekSandra]. (2021, 28.November). Für Omikron funktionierende Schnelltests. Twitter. https://twitter.com/CiesekSandra/status/1464925734741368837

[Covid-19] Wie sicher sind die Ergebnisse von Schnelltests?

Spektrum der Wissenschaft berichtet über die Analyse eines deutschen Forschungsteams zur Zuverlässigkeit von Antigen-Schnelltests.

Ergebnis: rund jeder fünfte Test misst Mist…

Gelitz, C. (2021, 29. November). Covid-19-Antigen-Schnelltests: Wie sicher sind die Ergebnisse von Schnelltests? Spektrum der Wissenschaft. Abgerufen am 4. Dezember 2021, von https://www.spektrum.de/news/welche-corona-schnelltests-sind-zuverlaessig/1954489

[OSX86] Catalina Issues

Current Status of Catalina 10.15.3: 

  • h264 hardware acceleration: weird or buggy (Symptom: Avidemux can’t scan timestamps in transport streams)
  • mp4 system integration: buggy (Symptom: in certain cases mp4 encapulsated x264 videos cannot be opened within Ableton Live 10.x)
  • Finder: weird or buggy (Symptoms: apps can’t be closed and remain open in Finder, no matter what, shutdown only via terminal then)
  • SMB-Sharing: SMB1 support dropped (Symptoms: you can’t connect to your Fritz.box NAS anymore)
  • Specific drivers: not [yet?] available (Symptoms: Novation Nocturne just doesn’t work at all anymore)

My recommendation: stay with Mojave a little longer, Catalina is immature. I am going back to a working macOS now and do a full restore of my properly working Mojave from mid feb 2020. Estimated restoration time for 1TB SSD: 90mins.

In case you really wanna go Catalina and burn your own fingers, let me recommend you to perform a full backup of your Mojave installation [overnight]. Depending on the disk size, this can take a cpl of hours. Carbon Copy Cloner is your tool of choice in this case…

[OSX86] Setting up an iHackintosh 18,3

So ten years are over. In order to use latest music production tools (Ableton 10, Reason 11 and Cubase 10) I had to upgrade my old hackintosh and set up a new one. Luckily the community and the technology has made so much progress in the meantime that lots of adaptations required to get a hackintosh to work in vanilla mode ten years ago are just not necessary anymore. For instance, nowadays UEFI has become standard on motherboards. Back then, you had to build a pseudo Apple EFI 1.x emulation on top of the BIOS. That has become a lot easier and me likey mucho.

Ok, so much for the history lessons, let’s make a long story short. After reading mainly here, here and there I set up my system with the following configuration (yes this article is a refreshed version of my older post over at TonyMacX86)…

Continue reading

[Bitwig] EDU License Now Available

The Bitwig Studio EDU License is now available to students, faculty, staff, and administrators attending or working at an accredited educational facility or institution. Eventually there is a cost effective solution for purchasing BITWIG STUDIO.

The Bitwig Studio EDU License is available from selected distributors worldwide and online from Bitwig’s webshop.

To find out more about Bitwig Studio EDU license eligibility requirements, please visit Bitwig’s FAQ Section.

Bitwig Studio EDU Pricing
269.99 USD
209 EUR (incl. German VAT of 19%)
169.99 GBP (incl. UK VAT of 20%)

Educational Site Licenses are also now available upon request. For Site Licenses contact Bitwig via edu@bitwig.com

[Muzaq] BlueCatAudio’s Free Frequency Analyzer Plugin

Are you searching for a Frequency Analyzer Plugin? You may check Blue Cat Audio’s handy freeware plugin…

Blue Cat’s FreqAnalyst is a free spectrum analyzer plug-in that lets you monitor the spectral content of your audio signal in real time.

Free multiplatform download and many more details here

bcafanalyzer