Spaces:
Sleeping
Sleeping
Upload setup.sh
Browse files
setup.sh
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
|
| 3 |
+
# Exit immediately if a command exits with a non-zero status.
|
| 4 |
+
set -e
|
| 5 |
+
|
| 6 |
+
# Update and install system-level dependencies
|
| 7 |
+
echo "APT-GET: UPDATING AND INSTALLING DEPENDENCIES"
|
| 8 |
+
apt-get update -y
|
| 9 |
+
apt-get install -y tesseract-ocr \
|
| 10 |
+
libtesseract-dev \
|
| 11 |
+
tesseract-ocr-fra \
|
| 12 |
+
tesseract-ocr-spa
|
| 13 |
+
|
| 14 |
+
# Clean up the apt cache to reduce image size
|
| 15 |
+
rm -rf /var/lib/apt/lists/*
|
| 16 |
+
|
| 17 |
+
# Install Python dependencies from requirements.txt
|
| 18 |
+
echo "PIP: INSTALLING PYTHON PACKAGES"
|
| 19 |
+
pip install --no-cache-dir -r requirements.txt
|
| 20 |
+
|
| 21 |
+
echo "SETUP COMPLETE"
|