-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Dockerfile for building SPTAG (#36)
* add Dockerfile for building * add trailing slash in README.md * add SPTAG to PYTHONPATH * update cmake comment to be more specific
- Loading branch information
Showing
2 changed files
with
37 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,31 @@ | ||
FROM ubuntu:18.04 | ||
|
||
WORKDIR /app | ||
COPY CMakeLists.txt ./ | ||
COPY AnnService ./AnnService/ | ||
COPY Test ./Test/ | ||
COPY Wrappers ./Wrappers/ | ||
|
||
RUN apt-get update && apt-get -y install wget build-essential libtbb-dev \ | ||
# remove the following if you don't want to build the wrappers | ||
openjdk-8-jdk python3-pip swig | ||
|
||
# cmake >= 3.12 is required | ||
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.tar.gz" -q -O - \ | ||
| tar -xz --strip-components=1 -C /usr/local | ||
|
||
# specific version of boost | ||
RUN wget "https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.gz" -q -O - \ | ||
| tar -xz && \ | ||
cd boost_1_67_0 && \ | ||
./bootstrap.sh && \ | ||
./b2 install && \ | ||
# update ld cache so it finds boost in /usr/local/lib | ||
ldconfig && \ | ||
cd .. && rm -rf boost_1_67_0 | ||
|
||
# build | ||
RUN mkdir build && cd build && cmake .. && make && cd .. | ||
|
||
# so python can find the SPTAG module | ||
ENV PYTHONPATH=/app/Release |
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