-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee039fb
commit 63c0212
Showing
3 changed files
with
452 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM cimg/base:stable-20.04 | ||
|
||
# Install python3, swig, and MKL. | ||
RUN sudo apt-get update && \ | ||
sudo apt-get install -y python3-dev python3-pip swig libmkl-dev | ||
|
||
# Install recent CMake. | ||
RUN wget -nv -O - https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1-Linux-x86_64.tar.gz | sudo tar xzf - --strip-components=1 -C /usr | ||
|
||
# Install numpy/scipy/pytorch for python tests. | ||
RUN pip3 install numpy scipy torch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM nvidia/cuda:10.2-devel-ubuntu18.04 | ||
|
||
# Install python3, wget, and openblas. | ||
RUN apt-get update && \ | ||
apt-get install -y python3-dev python3-pip libopenblas-dev wget libpcre3-dev | ||
|
||
# Install swig 4.0.2. | ||
RUN wget -nv -O - https://sourceforge.net/projects/swig/files/swig/swig-4.0.2/swig-4.0.2.tar.gz/download | tar zxf - && cd swig-4.0.2 && ./configure && make -j && make install | ||
|
||
# Install recent CMake. | ||
RUN wget -nv -O - https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1-Linux-x86_64.tar.gz | tar xzf - --strip-components=1 -C /usr | ||
|
||
# Install numpy/scipy/pytorch for python tests. | ||
RUN pip3 install numpy scipy torch | ||
|
||
COPY . /faiss | ||
|
||
WORKDIR /faiss | ||
|
||
RUN cmake -B build \ | ||
-DFAISS_ENABLE_GPU=ON \ | ||
-DFAISS_ENABLE_C_API=ON \ | ||
-DFAISS_ENABLE_PYTHON=ON \ | ||
-DBUILD_TESTING=ON \ | ||
-DCMAKE_CUDA_FLAGS="-gencode arch=compute_75,code=sm_75" \ | ||
. | ||
|
||
RUN make -C build -j8 |
Oops, something went wrong.