Skip to content

Commit cc3a748

Browse files
authored
Merge pull request #517 from cococo2000/update-milvus
update milvus 2.4.x, add index hnsw, flat, ivfflat, ivfsq8, ivfpq, scann
2 parents 1c3f702 + 09d63b8 commit cc3a748

File tree

4 files changed

+349
-41
lines changed

4 files changed

+349
-41
lines changed
Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
FROM milvusdb/knowhere-env:pyknowhere1.3-20230303
1+
FROM ann-benchmarks
22

3-
WORKDIR /home/app
4-
COPY run_algorithm.py requirements.txt ./
3+
# Add Docker's official GPG key:
4+
RUN apt-get update
5+
RUN apt-get install ca-certificates curl
6+
RUN install -m 0755 -d /etc/apt/keyrings
7+
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
8+
RUN chmod a+r /etc/apt/keyrings/docker.asc
59

6-
# update python packages
7-
RUN pip3 install -r requirements.txt
8-
RUN pip3 install scipy==1.10.1
9-
RUN python3 -c 'import pyknowhere'
10+
# Add the repository to Apt sources:
11+
RUN echo \
12+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
13+
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
14+
tee /etc/apt/sources.list.d/docker.list > /dev/null
1015

11-
ENTRYPOINT ["python3", "-u", "run_algorithm.py"]
16+
RUN apt-get update
17+
RUN apt-get install -y wget docker-ce-cli docker-compose-plugin
18+
19+
RUN pip3 install pymilvus==2.4.1
20+
RUN python3 -c "from pymilvus import Collection"
21+
22+
# Install milvus standalone by docker-compose.yml
23+
RUN wget https://github.com/milvus-io/milvus/releases/download/v2.4.1/milvus-standalone-docker-compose.yml -O docker-compose.yml
24+
RUN sed -i 's|${DOCKER_VOLUME_DIRECTORY:-.}|/tmp|g' docker-compose.yml
Lines changed: 67 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,69 @@
11
float:
22
any:
3-
- base_args: ['@metric', '@dimension']
4-
constructor: Milvus
5-
disabled: false
6-
docker_tag: ann-benchmarks-milvus
7-
module: ann_benchmarks.algorithms.milvus
8-
name: Milvus(Knowhere)
9-
run_groups:
10-
HNSW:
11-
args:
12-
M: [4, 8, 12, 16, 24, 36, 48, 64, 96]
13-
efConstruction: 500
14-
query_args: [[10, 15, 20, 25, 30, 35, 40, 50, 60, 80, 120, 200, 400, 600,
15-
800]]
3+
- base_args: ["@metric", "@dimension"]
4+
constructor: MilvusFLAT
5+
disabled: false
6+
docker_tag: ann-benchmarks-milvus
7+
module: ann_benchmarks.algorithms.milvus
8+
name: milvus-flat
9+
run_groups:
10+
FLAT:
11+
args:
12+
placeholder: [0]
13+
- base_args: ["@metric", "@dimension"]
14+
constructor: MilvusIVFFLAT
15+
disabled: false
16+
docker_tag: ann-benchmarks-milvus
17+
module: ann_benchmarks.algorithms.milvus
18+
name: milvus-ivfflat
19+
run_groups:
20+
IVFFLAT:
21+
args:
22+
nlist: [128, 256, 512, 1024, 2048, 4096]
23+
query_args: [[1, 10, 20, 50, 100]]
24+
- base_args: ["@metric", "@dimension"]
25+
constructor: MilvusIVFSQ8
26+
disabled: false
27+
docker_tag: ann-benchmarks-milvus
28+
module: ann_benchmarks.algorithms.milvus
29+
name: milvus-ivfsq8
30+
run_groups:
31+
IVFSQ8:
32+
args:
33+
nlist: [128, 256, 512, 1024, 2048, 4096]
34+
query_args: [[1, 10, 20, 50, 100]]
35+
- base_args: ["@metric", "@dimension"]
36+
constructor: MilvusIVFPQ
37+
disabled: false
38+
docker_tag: ann-benchmarks-milvus
39+
module: ann_benchmarks.algorithms.milvus
40+
name: milvus-ivfpq
41+
run_groups:
42+
IVFPQ:
43+
args:
44+
nlist: [128, 256, 512, 1024, 2048, 4096]
45+
m: [2, 4]
46+
query_args: [[1, 10, 20, 50, 100]]
47+
- base_args: ["@metric", "@dimension"]
48+
constructor: MilvusHNSW
49+
disabled: false
50+
docker_tag: ann-benchmarks-milvus
51+
module: ann_benchmarks.algorithms.milvus
52+
name: milvus-hnsw
53+
run_groups:
54+
HNSW:
55+
args:
56+
M: [4, 8, 12, 16, 24, 36, 48, 64, 96]
57+
efConstruction: [200, 500]
58+
query_args: [[10, 20, 40, 80, 120, 200, 400, 600, 800]]
59+
- base_args: ["@metric", "@dimension"]
60+
constructor: MilvusSCANN
61+
disabled: false
62+
docker_tag: ann-benchmarks-milvus
63+
module: ann_benchmarks.algorithms.milvus
64+
name: milvus-scann
65+
run_groups:
66+
SCANN:
67+
args:
68+
nlist: [64, 128, 256, 512, 1024, 2048, 4096, 8192]
69+
query_args: [[1, 10, 20, 30, 50]]

0 commit comments

Comments
 (0)