forked from paulinus/opensfm-docker-base
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.python3
72 lines (64 loc) · 1.95 KB
/
Dockerfile.python3
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
FROM ubuntu:17.10
# Install apt-getable dependencies
RUN apt-get update \
&& apt-get install -y \
build-essential \
cmake \
git \
libatlas-base-dev \
libboost-python-dev \
libeigen3-dev \
libgoogle-glog-dev \
libopencv-dev \
libsuitesparse-dev \
python3-dev \
python3-numpy \
python3-opencv \
python3-pip \
python3-pyproj \
python3-scipy \
python3-yaml \
wget \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install Ceres from source
RUN \
mkdir -p /source && cd /source && \
wget http://ceres-solver.org/ceres-solver-1.13.0.tar.gz && \
tar xvzf ceres-solver-1.13.0.tar.gz && \
cd /source/ceres-solver-1.13.0 && \
mkdir -p build && cd build && \
cmake .. -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF && \
make install && \
cd / && \
rm -rf /source/ceres-solver-1.13.0 && \
rm -f /source/ceres-solver-1.13.0.tar.gz
# Install opengv from source
RUN \
mkdir -p /source && cd /source && \
git clone https://github.com/paulinus/opengv.git && \
cd /source/opengv && \
git checkout python3-support && \
mkdir -p build && cd build && \
cmake .. -DBUILD_TESTS=OFF \
-DBUILD_PYTHON=ON \
-DBUILD_FOR_PYTHON3=ON \
-DBOOST_PYTHON3_COMPONENT=python-py36 \
-DPYTHON_INSTALL_DIR=/usr/local/lib/python3.6/dist-packages/ \
&& \
make install && \
cd / && \
rm -rf /source/opengv
# Install python requirements
RUN \
pip3 install exifread==2.1.2 \
gpxpy==1.1.2 \
networkx==1.11 \
numpy \
pyproj==1.9.5.1 \
pytest==3.0.7 \
python-dateutil==2.6.0 \
PyYAML==3.12 \
scipy \
xmltodict==0.10.2