You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enhance installation and uninstallation scripts with improved error handling and user prompts
- Update install.sh to detect OS type and handle needlectl installation more robustly.
- Add interactive and non-interactive modes for uninstall.sh, allowing users to choose what to remove.
- Improve documentation for uninstallation and installation processes, including new options and commands.
- Update getting-started and uninstallation documentation for clarity and completeness.
During the installation process, you will be prompted to choose the database mode. The available options are:
64
+
During the installation process, you will be prompted to choose the performance configuration. The available options are:
65
+
66
+
-**Fast (Default):** Single CLIP model, fastest indexing and retrieval - best for getting started quickly
67
+
-**Balanced:** 4 models with balanced performance and accuracy
68
+
-**Accurate:** 6 models with highest accuracy but slower performance
51
69
52
-
-**Fast:** Offers quick responses and indexing with lower accuracy.
53
-
-**Balanced:** Provides a compromise between speed and accuracy.
54
-
-**Accurate:** Prioritizes high accuracy, which may come at the cost of slower performance.
70
+
You can also specify the configuration directly:
55
71
56
-
> **Warning:** Once the database mode is set, it cannot be changed without uninstalling and reinstalling Needle, which will result in data loss.
72
+
```bash
73
+
# Install with specific configuration
74
+
./scripts/install.sh fast
75
+
./scripts/install.sh balanced
76
+
./scripts/install.sh accurate
77
+
```
78
+
79
+
> **Warning:** Once the configuration mode is set, it cannot be changed without uninstalling and reinstalling Needle, which will result in data loss.
57
80
58
81
> **Note:** Needle automatically checks for GPU accessibility and will use the GPU if available to optimize performance.
59
82
@@ -62,12 +85,10 @@ During the installation process, you will be prompted to choose the database mod
62
85
The installation process sets up:
63
86
64
87
-**Virtual Environments:** Separate Python environments for backend and image generator services
65
-
-**Docker Infrastructure:** PostgreSQL, Milvus, and Redis services via Docker Compose
88
+
-**Docker Infrastructure:** PostgreSQL, Milvus, MinIO, and etcd services via Docker Compose
66
89
-**Configuration Files:** Performance-optimized settings based on your chosen mode
67
-
-**needlectl CLI:** Command-line interface for managing Needle
68
-
-**Web UI:** Optional web interface for easier interaction
69
-
70
-
After the installation completes, please close and reopen your terminal session (or source your shell configuration file) to ensure that all environment variables are correctly set.
90
+
-**needlectl CLI:** Command-line interface for managing Needle (installed to `/usr/local/bin/needlectl`)
91
+
-**Service Scripts:**`start-needle.sh`, `stop-needle.sh`, `status-needle.sh` for service management
71
92
72
93
## Starting the Needle Service
73
94
@@ -77,19 +98,34 @@ Once installed, start the Needle service by running:
77
98
needlectl service start
78
99
```
79
100
80
-
This command will download the required model weights and initiate all the necessary services.
101
+
Or if you installed manually:
102
+
103
+
```bash
104
+
./start-needle.sh
105
+
```
106
+
107
+
This command will start all the necessary infrastructure services (PostgreSQL, Milvus, etc.) and the Needle backend.
81
108
82
-
To verify that everything is running as expected, you can check the service status with:
109
+
To verify that everything is running as expected, check the service status:
83
110
84
111
```bash
85
112
needlectl service status
86
113
```
87
114
88
115
And confirm the installed version using:
116
+
89
117
```bash
90
118
needlectl --version
91
119
```
92
120
121
+
### Access Points
122
+
123
+
After starting services, you can access:
124
+
125
+
-**Backend API:**http://localhost:8000
126
+
-**API Documentation:**http://localhost:8000/docs
127
+
-**Image Generator:**http://localhost:8010
128
+
93
129
## About needlectl
94
130
95
131
The `needlectl` command-line tool is the primary interface for interacting with Needle. It will be discussed in detail in the subsequent sections, where you'll learn how to leverage its full capabilities.
> **Note:** This uninstallation command will remove Needle's services, data and configurations. However, it will not remove any cached Docker images. If you need to free up additional disk space, please consider manually removing those images.
13
+
> **Note:** When run non-interactively (piped from curl), the uninstall script will preserve your data (Docker volumes, ImageGeneratorsHub directory). To fully remove all data, run the uninstall script interactively.
14
+
15
+
## Interactive Uninstall (Recommended)
16
+
17
+
For more control over what gets removed, download and run the script interactively:
18
+
19
+
```bash
20
+
# For one-liner installations
21
+
cd~/.needle
22
+
./scripts/uninstall.sh
23
+
24
+
# For manual installations
25
+
cd /path/to/Needle
26
+
./scripts/uninstall.sh
27
+
```
28
+
29
+
The interactive uninstall will prompt you to:
30
+
- Remove the ImageGeneratorsHub directory
31
+
- Remove Docker volumes (contains your indexed data)
32
+
- Remove the entire Needle directory (for one-liner installations)
33
+
34
+
## Using Make
35
+
36
+
If you installed manually and have the Makefile available:
37
+
38
+
```bash
39
+
cd /path/to/Needle
40
+
make uninstall
41
+
```
42
+
43
+
## What Gets Removed
44
+
45
+
The uninstallation process removes:
46
+
47
+
-**Virtual Environments:** Backend (`backend/venv`) and ImageGeneratorsHub (`.venv`) environments
0 commit comments