-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·32 lines (26 loc) · 879 Bytes
/
setup.sh
File metadata and controls
executable file
·32 lines (26 loc) · 879 Bytes
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
31
32
#!/usr/bin/env bash
# Setup script: create venv and install Python dependencies.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
VENV_DIR="$SCRIPT_DIR/.venv"
echo "=== Setting up pdf-classifier ==="
# 1. Create virtual environment
if [ -d "$VENV_DIR" ]; then
echo "Virtual environment already exists at $VENV_DIR"
else
echo "Creating virtual environment..."
python3 -m venv "$VENV_DIR"
echo "Created $VENV_DIR"
fi
# 2. Install dependencies
echo "Installing Python dependencies..."
"$VENV_DIR/bin/pip" install --quiet -r "$SCRIPT_DIR/requirements.txt"
echo "Dependencies installed."
# 3. Verify Ollama
if command -v ollama &>/dev/null; then
echo "Ollama found: $(command -v ollama)"
else
echo "WARNING: Ollama is not installed."
echo "Install it from https://ollama.ai and then run start-server.sh"
fi
echo "=== Setup complete ==="