-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add conda packages metadata + tests. (#769)
+ Add conda packages metadata (now building Faiss using conda's toolchain); + add Dockerfile for building conda packages (for all CUDA versions); + add working Dockerfile building faiss on Centos7; + simplify GPU build; + avoid falling back to CPU-only version (python); + simplify TravisCI config; + update INSTALL.md; + add configure flag for specifying target architectures (--with-cuda-arch); + fix Makefile for gpu tests; + fix various Makefile issues; + remove stale file (gpu/utils/DeviceUtils.cpp).
- Loading branch information
Showing
34 changed files
with
2,435 additions
and
200,269 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
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
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 |
---|---|---|
@@ -1,38 +1,30 @@ | ||
FROM nvidia/cuda:8.0-devel-ubuntu16.04 | ||
MAINTAINER Pierre Letessier <pletessier@ina.fr> | ||
FROM nvidia/cuda:8.0-devel-centos7 | ||
|
||
RUN apt-get update -y | ||
RUN apt-get install -y libopenblas-dev python-numpy python-dev swig git python-pip wget | ||
# Install MKL | ||
RUN yum-config-manager --add-repo https://yum.repos.intel.com/mkl/setup/intel-mkl.repo | ||
RUN rpm --import https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | ||
RUN yum install -y intel-mkl-2019.3-062 | ||
ENV LD_LIBRARY_PATH /opt/intel/mkl/lib/intel64:$LD_LIBRARY_PATH | ||
ENV LIBRARY_PATH /opt/intel/mkl/lib/intel64:$LIBRARY_PATH | ||
ENV LD_PRELOAD /usr/lib64/libgomp.so.1:/opt/intel/mkl/lib/intel64/libmkl_def.so:\ | ||
/opt/intel/mkl/lib/intel64/libmkl_avx2.so:/opt/intel/mkl/lib/intel64/libmkl_core.so:\ | ||
/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so | ||
|
||
RUN pip install --upgrade pip | ||
RUN pip install matplotlib | ||
# Install necessary build tools | ||
RUN yum install -y gcc-c++ make swig3 | ||
|
||
# Install necesary headers/libs | ||
RUN yum install -y python-devel numpy | ||
|
||
COPY . /opt/faiss | ||
|
||
WORKDIR /opt/faiss | ||
|
||
ENV BLASLDFLAGS /usr/lib/libopenblas.so.0 | ||
|
||
RUN mv example_makefiles/makefile.inc.Linux ./makefile.inc | ||
|
||
RUN make tests/test_blas -j $(nproc) && \ | ||
make -j $(nproc) && \ | ||
make demos/demo_sift1M -j $(nproc) && \ | ||
make py | ||
|
||
RUN cd gpu && \ | ||
make -j $(nproc) && \ | ||
make test/demo_ivfpq_indexing_gpu && \ | ||
make py | ||
|
||
ENV PYTHONPATH $PYTHONPATH:/opt/faiss | ||
|
||
# RUN ./tests/test_blas && \ | ||
# tests/demo_ivfpq_indexing | ||
|
||
|
||
# RUN wget ftp://ftp.irisa.fr/local/texmex/corpus/sift.tar.gz && \ | ||
# tar xf sift.tar.gz && \ | ||
# mv sift sift1M | ||
|
||
# RUN tests/demo_sift1M | ||
# --with-cuda=/usr/local/cuda-8.0 | ||
RUN ./configure --without-cuda | ||
RUN make -j $(nproc) | ||
RUN make -C python | ||
RUN make test | ||
RUN make install | ||
RUN make -C demos demo_ivfpq_indexing && \ | ||
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH ./demos/demo_ivfpq_indexing |
Oops, something went wrong.