-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·80 lines (68 loc) · 2.36 KB
/
install.sh
File metadata and controls
executable file
·80 lines (68 loc) · 2.36 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/bin/bash
# Copyright © 2025 Dr.-Ing. Paul Wilhelm <paul@wilhelm.dev>
# This file is part of Archive Agent. See LICENSE for details.
# Exit on any error
set -e
# Unset conda environment variables to prevent uv conflicts
unset CONDA_DEFAULT_ENV CONDA_PREFIX
# Script permissions
chmod +x archive-agent.sh
chmod +x audit.sh
chmod +x manage-qdrant.sh
echo ""
echo ".------------."
echo "| Install uv |"
echo "'------------'"
# https://docs.astral.sh/uv/getting-started/installation/#standalone-installer
curl -LsSf https://astral.sh/uv/install.sh | sh
echo ""
echo ".---------------------."
echo "| Install environment |"
echo "'---------------------'"
uv sync --extra dev
echo ""
echo ".---------------------."
echo "| Install spaCy model |"
echo "'---------------------'"
uv run python -m spacy download en_core_web_md
echo ""
echo ".-----------------------."
echo "| (sudo) Install pandoc |"
echo "'-----------------------'"
sudo apt update && sudo apt install -y pandoc
# If 'ARCHIVE_AGENT_QDRANT_IN_MEMORY' is set, skip starting the Qdrant server.
if [[ -n "${ARCHIVE_AGENT_QDRANT_IN_MEMORY:-}" ]]; then
echo ""
echo ".----------------------------------."
echo "| Skipping Qdrant server (in-memory) |"
echo "'----------------------------------'"
echo "'ARCHIVE_AGENT_QDRANT_IN_MEMORY' is set; not running ./manage-qdrant.sh."
else
echo ""
echo ".------------------------------."
echo "| (sudo) Install Qdrant server |"
echo "'------------------------------'"
sudo ./manage-qdrant.sh start
fi
echo ""
echo ".-----------------------."
echo "| Install command alias |"
echo "'-----------------------'"
ALIAS_DEFINITION="alias archive-agent='$(pwd)/archive-agent.sh'"
if grep -Fxq "$ALIAS_DEFINITION" ~/.bashrc; then
echo "Alias 'archive-agent' already exists in ~/.bashrc."
else
echo "Adding 'archive-agent' alias to ~/.bashrc..."
echo "$ALIAS_DEFINITION" >> ~/.bashrc
echo "Alias added. Please run 'source ~/.bashrc' or open a new terminal to use it."
fi
echo ""
echo ".---------------------------------------."
echo "| Archive Agent: Successfully installed |"
echo "'---------------------------------------'"
echo ""
echo ""
echo ".---------------------------------------------------------------------."
echo "| INFO: Please start a new shell session to start using archive-agent |"
echo "'---------------------------------------------------------------------'"
echo ""