-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·42 lines (33 loc) · 1.13 KB
/
install.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.13 KB
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
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
set -e
PYTHON_VERSION="3.12"
VENV=".venv"
# Ensure relevant bin dirs are in PATH for this script
export PATH="$HOME/.local/bin:$HOME/.cargo/bin:$PATH"
# Check for uv
if ! command -v uv >/dev/null 2>&1; then
echo "UV not found. Installing UV..."
curl -LsSf https://astral.sh/uv/install.sh | sh
# This covers both .local/bin and .cargo/bin in our PATH already
fi
if ! command -v uv >/dev/null 2>&1; then
echo "Failed to install or locate uv. Please install uv and try again."
exit 1
fi
echo "UV found at: $(command -v uv)"
if [ ! -d "$VENV" ]; then
echo "Creating .venv with Python $PYTHON_VERSION..."
uv venv -p "$PYTHON_VERSION"
else
echo ".venv already exists, reusing it."
fi
echo "Activating virtual environment..."
source "$VENV/bin/activate"
echo "Installing dependencies for inference & development (CPU or system GPU as available)..."
uv pip install --group inference
uv pip install -e .
uv pip uninstall torch torchvision torchaudio
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
echo
echo "✅ Install complete. To run Panoptikon:"
echo " ./start.sh"