-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
60 lines (51 loc) · 1.32 KB
/
install.sh
File metadata and controls
60 lines (51 loc) · 1.32 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
#! /usr/bin/env bash
# ChatGPT'd
# Function to check if Docker is installed
check_docker() {
if command -v docker &> /dev/null; then
echo "Docker is installed."
return 0
else
echo "Docker is not installed. Please install Docker and try again."
return 1
fi
}
# Function to check if Qdrant image is already pulled
check_qdrant_image() {
if docker image inspect qdrant/qdrant &> /dev/null; then
echo "Qdrant image is already pulled."
return 0
else
echo "Qdrant image is not pulled. Pulling now..."
return 1
fi
}
# Function to pull Qdrant image
pull_qdrant() {
docker pull qdrant/qdrant
if [ $? -eq 0 ]; then
echo "Qdrant image pulled successfully."
else
echo "Failed to pull Qdrant image. Please check your internet connection and try again."
exit 1
fi
}
# Main installation process
main() {
echo "Starting installation process..."
# Check if Docker is installed
check_docker
if [ $? -ne 0 ]; then
exit 1
fi
# Check if Qdrant image is already pulled
check_qdrant_image
if [ $? -ne 0 ]; then
pull_qdrant
fi
# Add any additional installation steps here
echo "Installation completed successfully."
pip install -r requirements.txt
}
# Run the main function
main