Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ concurrency:

jobs:
unit-tests:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3 # Pull the repository
- run: sudo apt-get update && sudo apt-get install -y libhdf5-dev python3-numpy python3-scipy python3-matplotlib python3-sklearn
- run: pip3 install --quiet -r requirements.txt
- run: sudo apt-get update && sudo apt-get install -y libhdf5-dev python-is-python3 python3-pip
- run: pip install --quiet -r requirements.txt
- run: pytest

run-benchmarks:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
Expand Down Expand Up @@ -90,20 +90,20 @@ jobs:
- uses: actions/checkout@v3 # Pull the repository

- name: Install OS Dependencies
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev python3-numpy python3-scipy python3-matplotlib python3-sklearn
run: sudo apt-get update && sudo apt-get install -y libhdf5-dev python-is-python3 python3-pip

- name: Install Project Dependencies
run: pip3 install --quiet -r requirements.txt
run: pip install --quiet -r requirements.txt

- name: Build Library Docker Image
run: python3 install.py
run: python install.py

- name: Run the benchmark
run: |
python3 run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 3 --runs 2 --dataset $DATASET --run-disabled --timeout 300
python3 run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 3 --runs 2 --dataset $DATASET --run-disabled --batch --timeout 300
python run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 3 --runs 2 --dataset $DATASET --run-disabled --timeout 300
python run.py --docker-tag ann-benchmarks-${LIBRARY} --max-n-algorithms 3 --runs 2 --dataset $DATASET --run-disabled --batch --timeout 300
sudo chmod -R 777 results/
python3 plot.py --dataset $DATASET --output plot.png
python3 plot.py --dataset $DATASET --output plot-batch.png --batch
python3 data_export.py --out test.csv
python3 create_website.py --outputdir . --scatter --latex
python plot.py --dataset $DATASET --output plot.png
python plot.py --dataset $DATASET --output plot-batch.png --batch
python data_export.py --out test.csv
python create_website.py --outputdir . --scatter --latex
12 changes: 6 additions & 6 deletions ann_benchmarks/algorithms/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

RUN apt-get update
RUN apt-get install -y python3-numpy python3-scipy python3-pip build-essential git
RUN pip3 install -U pip
RUN python3 --version | grep 'Python 3.10'
RUN apt-get install -y python3-pip python-is-python3 build-essential git
RUN python --version | grep 'Python 3.12'

WORKDIR /home/app
COPY requirements.txt run_algorithm.py ./
RUN pip3 install -r requirements.txt
ENV PIP_BREAK_SYSTEM_PACKAGES=1
RUN pip install -r requirements.txt

ENTRYPOINT ["python3", "-u", "run_algorithm.py"]
ENTRYPOINT ["python", "-u", "run_algorithm.py"]
4 changes: 2 additions & 2 deletions ann_benchmarks/algorithms/elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN apt-get install -y curl
WORKDIR /usr/share/elasticsearch

# Create elasticsearch user and user group.
RUN groupadd -g 1000 elasticsearch
RUN adduser --uid 1000 --gid 1000 --home /usr/share/elasticsearch elasticsearch
RUN groupadd -g 1100 elasticsearch
RUN adduser --uid 1100 --gid 1100 --home /usr/share/elasticsearch elasticsearch

COPY --from=builder --chown=elasticsearch:elasticsearch /usr/share/elasticsearch /usr/share/elasticsearch

Expand Down
2 changes: 1 addition & 1 deletion ann_benchmarks/algorithms/elastiknn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ USER root
WORKDIR /home/app

# Install python client.
RUN python3 -m pip install elastiknn-client==8.15.0.1
RUN python3 -m pip install elastiknn-client==8.15.3.0

# Custom entrypoint that also starts the Elasticsearch server in the background
RUN echo '\
Expand Down
14 changes: 7 additions & 7 deletions ann_benchmarks/algorithms/expann/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository -y ppa:git-core/ppa
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y git make cmake g++ libaio-dev libgoogle-perftools-dev libunwind-dev clang-format libboost-dev libboost-program-options-dev libmkl-full-dev libcpprest-dev python3.10 nlohmann-json3-dev libeigen3-dev nlohmann-json3-dev valgrind
RUN DEBIAN_FRONTEND=noninteractive apt install -y git make cmake g++ libaio-dev libgoogle-perftools-dev libunwind-dev clang-format libboost-dev libboost-program-options-dev libmkl-full-dev libcpprest-dev nlohmann-json3-dev libeigen3-dev nlohmann-json3-dev valgrind

ADD https://api.github.com/repos/jacketsj/expANN/git/refs/heads/ann-benchmarks-stable-v1 version.json
RUN git clone -b main https://github.com/jacketsj/expANN.git
Expand All @@ -16,9 +16,9 @@ ENV PYTHONPATH=$PYTHONPATH:/home/app/expANN/build

WORKDIR /home/app

RUN python3 -c "import expann_py"
RUN python3 -c "import expann_py_64"
RUN python3 -c "import expann_py_128"
RUN python3 -c "import expann_py_256"
RUN python3 -c "import expann_py_832"
RUN python3 -c "import expann_py_960"
RUN python -c "import expann_py"
RUN python -c "import expann_py_64"
RUN python -c "import expann_py_128"
RUN python -c "import expann_py_256"
RUN python -c "import expann_py_832"
RUN python -c "import expann_py_960"
15 changes: 2 additions & 13 deletions ann_benchmarks/algorithms/faiss/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,7 @@
FROM ann-benchmarks

RUN apt update && apt install -y wget
RUN wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
RUN bash Anaconda3-2020.11-Linux-x86_64.sh -b

ENV PATH /root/anaconda3/bin:$PATH

RUN python3 -m pip install ansicolors==1.1.8 docker==5.0.2
RUN conda install -c pytorch faiss-cpu h5py numpy

# https://developpaper.com/a-pit-of-mkl-library-in-linux-anaconda/
ENV LD_PRELOAD /root/anaconda3/lib/libmkl_core.so:/root/anaconda3/lib/libmkl_sequential.so

RUN python3 -c 'import faiss; print(faiss.IndexFlatL2)'
RUN pip install faiss-cpu
RUN python -c 'import faiss; print(faiss.IndexFlatL2)'



7 changes: 3 additions & 4 deletions ann_benchmarks/algorithms/hnswlib/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
FROM ann-benchmarks

RUN apt-get install -y python-setuptools python-pip
RUN pip3 install pybind11 numpy setuptools
RUN pip install pybind11
RUN git clone https://github.com/nmslib/hnsw.git;cd hnsw; git checkout denorm

RUN cd hnsw/python_bindings; python3 setup.py install
RUN cd hnsw/python_bindings; python setup.py install

RUN python3 -c 'import hnswlib'
RUN python -c 'import hnswlib'

2 changes: 1 addition & 1 deletion ann_benchmarks/algorithms/kgraph/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ann-benchmarks

RUN apt-get update && apt-get install -y libboost-timer-dev libboost-chrono-dev libboost-program-options-dev libboost-system-dev libboost-python-dev
RUN apt-get update && apt-get install -y libboost-timer-dev libboost-chrono-dev libboost-program-options-dev libboost-system-dev libboost-python-dev libopenblas-dev
RUN git clone https://github.com/aaalgo/kgraph
RUN cd kgraph && python3 setup.py build && python3 setup.py install
RUN python3 -c 'import pykgraph'
3 changes: 2 additions & 1 deletion ann_benchmarks/algorithms/redisearch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ FROM redislabs/redisearch as redisearch
FROM ann-benchmarks

# Install Redis
RUN apt-get update && apt-get install -y curl lsb-core
RUN apt-get install lsb-release curl gpg
RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
RUN chmod 644 /usr/share/keyrings/redis-archive-keyring.gpg
RUN echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list
RUN apt-get update
RUN apt-get install -y redis
Expand Down
5 changes: 2 additions & 3 deletions ann_benchmarks/algorithms/scann/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
FROM ann-benchmarks

RUN pip3 install --upgrade pip
RUN pip3 install scann
RUN python3 -c 'import scann'
RUN pip install scann
RUN python -c 'import scann'
5 changes: 2 additions & 3 deletions ann_benchmarks/algorithms/voyager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ann-benchmarks

RUN apt-get install -y python-setuptools python-pip
RUN pip3 install voyager
RUN pip install voyager

RUN python3 -c 'import voyager'
RUN python -c 'import voyager'

20 changes: 10 additions & 10 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
ansicolors==1.1.8
docker==7.1.0
h5py==3.8.0
matplotlib==3.6.3
numpy==1.24.2
pyyaml==6.0
psutil==5.9.4
scikit-learn==1.2.1
jinja2==3.1.2
pytest==7.2.2
datasets==2.12.0
requests==2.31.0
h5py==3.13.0
matplotlib==3.10.1
numpy==2.2.4
pyyaml==6.0.2
psutil==7.0.0
scikit-learn==1.6.1
jinja2==3.1.6
pytest==8.3.5
datasets==3.4.0
requests==2.32.3
Loading