-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 855 Bytes
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM alpine:latest AS shared-dependencies
RUN apk update && \
apk add --no-cache libtbb \
yaml-cpp \
openblas && \
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing dlib
FROM shared-dependencies AS build-stage
RUN apk add --no-cache g++ \
cmake \
make \
eigen-dev \
libtbb-dev \
openblas-dev \
yaml-cpp-dev && \
apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing dlib-dev
WORKDIR /home/dependencies
RUN wget https://github.com/jlblancoc/nanoflann/archive/refs/heads/master.zip && \
unzip master.zip && \
rm master.zip
WORKDIR ./nanoflann-master/build
RUN cmake .. && make install
WORKDIR /home
COPY ./simple ./simple
WORKDIR ./build
RUN cmake ../simple && make
FROM shared-dependencies AS final-stage
COPY --from=build-stage /home/build/simple ./simple
ENTRYPOINT ["./simple"]