Skip to content
Snippets Groups Projects
Commit a44dd0cf authored by Dmytro Bogatov's avatar Dmytro Bogatov :two_hearts:
Browse files

Add faiss [ci-skip].

parent 1eb24302
Branches
No related tags found
No related merge requests found
Pipeline #23757 skipped
FROM dbogatov/docker-sources:conda-miniconda3
LABEL maintainer="Dmytro Bogatov <dmytro@dbogatov.org>"
COPY setup.sh /
RUN /setup.sh
# FAISS
In this image:
* FAISS (latest, from source)
* mkl (latest, from conda)
* google test and benchmark
* cmake 3.17.3
#!/usr/bin/env bash
set -e
conda install -y -c pytorch mkl
apt-get update
apt-get install --no-install-recommends -y make g++ wget libssl-dev libpthread-stubs0-dev git libboost-all-dev
# CMake 3.17.3
cd /tmp/
version=3.17
build=3
mkdir ~/temp
cd ~/temp
wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
tar -xzvf cmake-$version.$build.tar.gz
cd cmake-$version.$build/
./bootstrap
make -j$(nproc)
make install
cd ~
# Google Test
cd /tmp/
git clone https://github.com/google/googletest.git
cd googletest
cmake CMakeLists.txt
make
make install
cd ~
# Google becnhmark
cd /tmp/
git clone https://github.com/google/benchmark.git
git clone https://github.com/google/googletest.git benchmark/googletest
cd benchmark
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make
make install
cd ~
# faiss
cd /tmp/
git clone https://github.com/facebookresearch/faiss.git
cd faiss
cmake -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_PYTHON=OFF -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -B build .
make -C build faiss
make -C build install
cd ~
# remove temporary files
apt-get purge -y git
apt-get autoremove -y
rm -rf /var/lib/apt/lists/* /tmp/*
#!/bin/bash
set -e
# Script to test the image
[ -f /usr/local/lib/libfaiss.so ]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment