-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
29 lines (21 loc) · 877 Bytes
/
setup.sh
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
#!/bin/sh
# Speed up setup on VCL Ubuntu+CUDA machine, untested elsewhere
# Run in base of repo
# Install pip and requirements
sudo apt install -y pip
# # Create and activate venv (optional)
# python3 -m venv .venv
# source .venv/bin/activate
# Auto confirm (since no '-y' option)
yes | pip install -r requirements.txt
# Tesseract requirements
sudo apt install -y tesseract-ocr libtesseract-dev libleptonica-dev pkg-config
# Tessdata (english and OSD)
mkdir ~/.local/share/tessdata
curl -LJ -o ~/.local/share/tessdata/eng.traineddata https://github.com/tesseract-ocr/tessdata/raw/main/eng.traineddata
curl -LJ -o ~/.local/share/tessdata/osd.traineddata https://github.com/tesseract-ocr/tessdata/raw/main/osd.traineddata
# CuDNN
sudo apt install -y libcudnn8 libcudnn8-dev libcudnn8-samples
# Tensorflow GPU support
# Auto confirm
yes | pip install tensorflow[and-cuda]