-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcomputer_calamari_setup.txt
31 lines (25 loc) · 1.04 KB
/
computer_calamari_setup.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Install Calamari OCR and related programs on a linux computer.
# kraken now requires python 3.6, which is not easily available on ubuntu 16.04
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6 python3.6-dev
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2
# change symlink if necessary
sudo update-alternatives --config python3
# fix shebang to point to python3.5
sudo vi /usr/bin/gnome-terminal
sudo apt-get install python3.6-gdbm
python3 -V
curl https://bootstrap.pypa.io/get-pip.py | sudo -H python3.6
pip3 -V
sudo pip3 install numpy matplotlib pandas
sudo apt-get install -y libpangocairo-1.0 libxml2 libblas3 liblapack3
sudo pip3 install kraken calamari_ocr
python3 -c 'import torch; print(torch.version.cuda); print(torch.__version__)'
# may be necessary
sudo pip3 uninstall lxml
sudo pip3 install lxml
# sources of training data
http://shabait.com/eritrea-haddas
http://shabait.com/haddas-ertra