-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (35 loc) · 983 Bytes
/
Dockerfile
File metadata and controls
42 lines (35 loc) · 983 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
37
38
39
40
41
42
FROM ubuntu:20.04
# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq \
ccache \
cmake \
flake8 \
git \
libboost-filesystem-dev \
libboost-system-dev \
libceres-dev \
libfmt-dev \
libgtest-dev \
libopencv-dev \
libpython3-dev \
make \
pybind11-dev \
python3-opencv \
python3-pip \
valgrind
COPY ./requirements.txt /opt/src/mvgkit/requirements.txt
RUN pip install --upgrade setuptools pip && pip install -r /opt/src/mvgkit/requirements.txt -q
# Setup
COPY ./ /opt/src/mvgkit/
WORKDIR /opt/src/mvgkit/
# C++ build
RUN \
cmake -S . -B /opt/build -DBUILD_MVGKIT_TESTS=ON -DCMAKE_BUILD_TYPE=Release && \
cmake --build /opt/build/ --target install -j16 --config Release
# Python build
RUN python3 setup.py build -j 16 install
# Tests
RUN \
python3 /opt/src/mvgkit/tools/run_test.py --build-dir /opt/build -p -1
# Cleanup
RUN rm -rf /opt/src/mvgkit /opt/build