meryemarpaci commited on
Commit
b6c728a
Β·
verified Β·
1 Parent(s): 97b8b60

Upload 3 files

Browse files
Files changed (3) hide show
  1. Dockerfile +27 -0
  2. README.md +56 -10
  3. qdrant-storage.tar.gz +3 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM qdrant/qdrant:latest
2
+
3
+ # Storage backup'Δ± container'a kopyala
4
+ COPY qdrant-storage.tar.gz /tmp/
5
+
6
+ # Storage'Δ± restore et (extract)
7
+ RUN tar xzf /tmp/qdrant-storage.tar.gz -C / && \
8
+ rm /tmp/qdrant-storage.tar.gz && \
9
+ chmod -R 755 /qdrant/storage
10
+
11
+ # HuggingFace Spaces default port: 7860
12
+ ENV QDRANT__SERVICE__HTTP_PORT=7860
13
+ ENV QDRANT__SERVICE__GRPC_PORT=6334
14
+ ENV QDRANT__LOG_LEVEL=INFO
15
+
16
+ # Health check
17
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
18
+ CMD curl -f http://localhost:7860/health || exit 1
19
+
20
+ # Expose HuggingFace port
21
+ EXPOSE 7860 6334
22
+
23
+ # Persistent storage
24
+ VOLUME ["/qdrant/storage"]
25
+
26
+ # Start Qdrant
27
+ CMD ["./qdrant"]
README.md CHANGED
@@ -1,10 +1,56 @@
1
- ---
2
- title: Pentagent Qdrant
3
- emoji: πŸŒ–
4
- colorFrom: gray
5
- colorTo: pink
6
- sdk: docker
7
- pinned: false
8
- ---
9
-
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Pentagent Qdrant CVE Database
3
+ emoji: πŸ”
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: docker
7
+ pinned: false
8
+ app_port: 7860
9
+ ---
10
+
11
+ # πŸ” Pentagent CVE RAG - Qdrant Vector Database
12
+
13
+ This HuggingFace Space hosts the Qdrant vector database for Pentagent security testing platform.
14
+
15
+ ## πŸ“Š Features
16
+
17
+ - **95,000+ CVE vectors** from NVD (2022-2024)
18
+ - **Hybrid search** (Dense 70% + Sparse 30%)
19
+ - **BGE-M3 embeddings** (1024 dimensions)
20
+ - **Open source** (Apache 2.0 License)
21
+
22
+ ## πŸ”Œ API Endpoints
23
+
24
+ **Base URL:** `https://YOUR_USERNAME-pentagent-qdrant.hf.space`
25
+
26
+ - `GET /health` - Health check
27
+ - `GET /collections` - List collections
28
+ - `POST /collections/{collection}/points/search` - Vector search
29
+
30
+ ## πŸš€ Usage
31
+
32
+ ```python
33
+ from qdrant_client import QdrantClient
34
+
35
+ client = QdrantClient(
36
+ url="https://YOUR_USERNAME-pentagent-qdrant.hf.space",
37
+ timeout=30
38
+ )
39
+
40
+ # Search CVEs
41
+ results = client.search(
42
+ collection_name="cve_collection_hybrid",
43
+ query_vector=...,
44
+ limit=10
45
+ )
46
+ ```
47
+
48
+ ## πŸ“ License
49
+
50
+ Apache 2.0 - Open Source & Licensable
51
+
52
+ ## πŸ”— Related
53
+
54
+ - [Pentagent Backend](https://github.com/YOUR_USERNAME/pentagent-backend)
55
+ - [Qdrant Documentation](https://qdrant.tech/documentation/)
56
+
qdrant-storage.tar.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dbac38065eef659222aa62d1152e9f594101ab365da08f5f2be529a3d7c2dd8f
3
+ size 436950801