Spaces:
Configuration error
Configuration error
added scripts for running and setting up cpu optimization
Browse files- run.sh +13 -0
- setup-cpu-optimization.sh +7 -0
run.sh
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# NOTE: When it comes time for production deployment, I should:
|
4 |
+
# - dockerize this
|
5 |
+
# - see if I should be using uv instead of python3
|
6 |
+
# - download the model weights to a local directory, see:
|
7 |
+
# - DOCLING_SERVE_ARTIFACTS_PATH
|
8 |
+
|
9 |
+
if [ "$1" = "dev" ]; then
|
10 |
+
python3 docling-serve dev
|
11 |
+
else
|
12 |
+
python3 docling-serve run
|
13 |
+
fi
|
setup-cpu-optimization.sh
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/bin/bash
|
2 |
+
|
3 |
+
# Install uv if not already available
|
4 |
+
curl -LsSf https://astral.sh/uv/install.sh | sh
|
5 |
+
|
6 |
+
# Install dependencies
|
7 |
+
uv sync --extra cpu
|