-
Notifications
You must be signed in to change notification settings - Fork 7
Setup native CUDA Toolkit for Qurator tools on Ubuntu 18.04
Several of the tools provided by the Qurator-SPK project ship with OCR-D interfaces, such as
- https://github.com/qurator-spk/sbb_binarization
- https://github.com/qurator-spk/sbb_textline_detection
- https://github.com/qurator-spk/eynollah
All of these benefit from improved processing speed when a GPU and CUDA are used.
However, since the above tools require tensorflow-gpu
version 1.15.x from PyPI, which is compatible
only with a specific CUDA Toolkit version (10.0), here is a short guide on how to setup the CUDA Toolkit
installation natively on Ubuntu 18.04 x86_64 with the correct versions required by the Qurator-SPK tools.
As a first step, the current version of the proprietary nvidia-driver needs to be installed.
Running
ubuntu-drivers devices
returns a list with suitable drivers and indicates which one is recommended.
Now you can install the recommended nvidia-driver-{version} with
sudo apt-get install nvidia-driver-{version}
If the installation completes successfully, it is recommended to perform a reboot now.
To check if the installation succeeded, run
nvidia-smi
which should indicate the version of the nvidia-driver
installed.
For this step, it is necessary to first create an account for the Nvidia Developer Zone, in order to be able to download the CUDA Toolkit.
Next, download the deb (local)
version of CUDA 10.0
wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64
and follow the installation procedure
sudo dpkg -i cuda-repo-ubuntu1804-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-<version>/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda-toolkit-10-0
It is important here to specify sudo apt-get install cuda-toolkit-10-0
rather than sudo apt-get install cuda
because CUDA will otherwise install a different version of the nvidia-driver, which can cause issues and instabilities with the operating system.
To verify whether the installation succeeded, run
nvcc --version
which should return the correct CUDA version (10.0).
Next the correct CuDNN libraries version 7.6 for CUDA 10.0 need to be installed. For this, three packages in total need to be downloaded
wget https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.0_20191031/Ubuntu18_04-x64/libcudnn7_7.6.5.32-1%2Bcuda10.0_amd64.deb
wget https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.0_20191031/Ubuntu18_04-x64/libcudnn7-dev_7.6.5.32-1%2Bcuda10.0_amd64.deb
wget https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.0_20191031/Ubuntu18_04-x64/libcudnn7-doc_7.6.5.32-1%2Bcuda10.0_amd64.deb
Install each of them by running
sudo dpkg -i libcudnn7_7.6.5.32-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.0_amd64.deb
sudo dpkg -i libcudnn7-doc_7.6.5.32-1+cuda10.0_amd64.deb
Finally, to ensure the PATH
is correctly set, follow the Post-installation actions by adding /usr/local/cuda-10.0/bin
to the PATH
variable like this
export PATH=/usr/local/cuda-10.0/bin${PATH:+:${PATH}}
Welcome to the OCR-D wiki, a companion to the OCR-D website.
Articles and tutorials
- Running OCR-D on macOS
- Running OCR-D in Windows 10 with Windows Subsystem for Linux
- Running OCR-D on POWER8 (IBM pSeries)
- Running browse-ocrd in a Docker container
- OCR-D Installation on NVIDIA Jetson Nano and Xavier
- Mapping PAGE to ALTO
- Comparison of OCR formats (outdated)
- A Practicioner's View on Binarization
- How to use the bulk-add command to generate workspaces from existing files
- Evaluation of (intermediary) steps of an OCR workflow
- A quickstart guide to ocrd workspace
- Introduction to parameters in OCR-D
- Introduction to OCR-D processors
- Introduction to OCR-D workflows
- Visualizing (intermediate) OCR-D-results
- Guide to updating ocrd workspace calls for 2.15.0+
- Introduction to Docker in OCR-D
- How to import Abbyy-generated ALTO
- How to create ALTO for DFG Viewer
- How to create searchable fulltext data for DFG Viewer
- Setup native CUDA Toolkit for Qurator tools on Ubuntu 18.04
- OCR-D Code Review Guidelines
- OCR-D Recommendations for Using CI in Your Repository
Expert section on OCR-D- workflows
Particular workflow steps
Workflow Guide
- Workflow Guide: preprocessing
- Workflow Guide: binarization
- Workflow Guide: cropping
- Workflow Guide: denoising
- Workflow Guide: deskewing
- Workflow Guide: dewarping
- Workflow Guide: region-segmentation
- Workflow Guide: clipping
- Workflow Guide: line-segmentation
- Workflow Guide: resegmentation
- Workflow Guide: olr-evaluation
- Workflow Guide: text-recognition
- Workflow Guide: text-alignment
- Workflow Guide: post-correction
- Workflow Guide: ocr-evaluation
- Workflow Guide: adaptation-of-coordinates
- Workflow Guide: format-conversion
- Workflow Guide: generic transformations
- Workflow Guide: dummy processing
- Workflow Guide: archiving
- Workflow Guide: recommended workflows