Commit 28168310 authored by Pierre Letessier's avatar Pierre Letessier Committed by Matthijs Douze

Docker improvements (#88)

* Docker build from local sources rather than Github cloned sources

* Update INSTALL instructions for docker build from Github repo

* Back to generic makefile.inc.Linux and use of env var in Dockerfile

* Back to generic makefile.inc.Linux and use of env var in Dockerfile
parent 6893b9e1
......@@ -6,13 +6,13 @@ RUN apt-get install -y libopenblas-dev python-numpy python-dev swig git python-p
RUN pip install matplotlib
RUN cd /opt/ && git clone https://github.com/facebookresearch/faiss.git
COPY . /opt/faiss
WORKDIR /opt/faiss
RUN mv example_makefiles/makefile.inc.Linux ./makefile.inc
ENV BLASLDFLAGS /usr/lib/libopenblas.so.0
RUN sed -i -e 's%^BLASLDFLAGS=/usr/lib64/libopenblas.so.0%# BLASLDFLAGS=/usr/lib64/libopenblas.so.0%g' -e 's%^# BLASLDFLAGS=/usr/lib/libopenblas.so.0$%BLASLDFLAGS=/usr/lib/libopenblas.so.0%g' makefile.inc
RUN mv example_makefiles/makefile.inc.Linux ./makefile.inc
RUN make tests/test_blas -j $(nproc) && \
make -j $(nproc) && \
......
......@@ -262,6 +262,10 @@ To build the "faiss" image, run
nvidia-docker build -t faiss .
or if you don't want/need to clone the sources, just run
nvidia-docker build -t faiss github.com/facebookresearch/faiss
If you want to run the tests during the docker build, uncomment the
last 3 "RUN" steps in the Dockerfile. But you might want to run the
tests by yourself, so just run
......
......@@ -60,16 +60,15 @@ FAISSSHAREDFLAGS=-shared
BLASCFLAGS=-DFINTEGER=int
# This is for Centos:
BLASLDFLAGS=/usr/lib64/libopenblas.so.0
BLASLDFLAGS?=/usr/lib64/libopenblas.so.0
# for Ubuntu 16:
# sudo apt-get install libopenblas-dev python-numpy python-dev
# BLASLDFLAGS=/usr/lib/libopenblas.so.0
# BLASLDFLAGS?=/usr/lib/libopenblas.so.0
# for Ubuntu 14:
# sudo apt-get install libopenblas-dev liblapack3 python-numpy python-dev
# BLASLDFLAGS=/usr/lib/libopenblas.so.0 /usr/lib/lapack/liblapack.so.3.0
# BLASLDFLAGS?=/usr/lib/libopenblas.so.0 /usr/lib/lapack/liblapack.so.3.0
#
# 3. Atlas
#
......@@ -80,7 +79,6 @@ BLASLDFLAGS=/usr/lib64/libopenblas.so.0
#
# BLASCFLAGS=-DFINTEGER=int
# BLASLDFLAGS=/usr/lib64/atlas-sse3/libptf77blas.so.3 /usr/lib64/atlas-sse3/liblapack.so
#
# 4. reference implementation
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment