From d104275a2cc8a6b6d3cd1d7e0c95148a79eeab75 Mon Sep 17 00:00:00 2001 From: Alexandr Guzhva Date: Fri, 13 Sep 2024 12:42:19 -0700 Subject: [PATCH] Add a dockerfile for development (#3851) Summary: It turns out to be very useful for testing faiss compilation in a fresh environment Pull Request resolved: https://github.com/facebookresearch/faiss/pull/3851 Reviewed By: junjieqi Differential Revision: D62655137 Pulled By: mengdilin fbshipit-source-id: c1c2591e26bd20fb3783d3661a4096eaf31c4c08 --- faiss/cppcontrib/docker_dev/Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 faiss/cppcontrib/docker_dev/Dockerfile diff --git a/faiss/cppcontrib/docker_dev/Dockerfile b/faiss/cppcontrib/docker_dev/Dockerfile new file mode 100644 index 0000000000..a31a9e3e91 --- /dev/null +++ b/faiss/cppcontrib/docker_dev/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:22.04 + +RUN apt update && apt install -y python3 python3-pip gcc g++ mc git swig sudo libomp-dev libopenblas-dev wget +RUN pip3 install numpy==1.26.4 scipy pytest +RUN cd /root && git clone https://github.com/facebookresearch/faiss +RUN wget -qO- "https://cmake.org/files/v3.26/cmake-3.26.5-linux-x86_64.tar.gz" | sudo tar --strip-components=1 -xz -C /usr/local +RUN cd /root/faiss && /usr/local/bin/cmake -B build -DFAISS_ENABLE_GPU=OFF -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release . +RUN cd /root/faiss && make -C build -j 8 faiss +RUN cd /root/faiss && make -C build -j 8 swigfaiss +RUN cd /root/faiss/build/faiss/python && python3 setup.py install