forked from alicevision/AliceVision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_uncertainty
138 lines (117 loc) · 4.99 KB
/
Dockerfile_uncertainty
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
ARG CUDA_TAG=9.2
ARG OS_TAG=7
ARG NPROC=8
FROM nvidia/cuda:${CUDA_TAG}-devel-centos${OS_TAG} as builder
LABEL maintainer="AliceVision Team [email protected]"
# use CUDA_TAG to select the image version to use
# see https://hub.docker.com/r/nvidia/cuda/
#
# CUDA_TAG=8.0-devel
# docker build --build-arg CUDA_TAG=$CUDA_TAG --tag alicevision:$CUDA_TAG .
#
# then execute with nvidia docker (https://github.com/nvidia/nvidia-docker/wiki/Installation-(version-2.0))
# docker run -it --runtime=nvidia alicevision
# OS/Version (FILE): cat /etc/issue.net
# Cuda version (ENV): $CUDA_VERSION
ENV AV_DEV=/opt/AliceVision_git \
AV_BUILD=/tmp/AliceVision_build \
AV_INSTALL=/opt/AliceVision_install \
AV_BUNDLE=/opt/AliceVision_bundle \
PATH="${PATH}:${AV_BUNDLE}" \
VERBOSE=1
# Install all compilation tools
# - file and openssl are needed for cmake
RUN yum -y install \
file \
build-essential \
make \
git \
wget \
unzip \
yasm \
pkg-config \
libtool \
nasm \
automake \
openssl-devel \
gcc-gfortran
RUN yum install -y centos-release-scl scl-utils
RUN yum install -y devtoolset-7-gcc*
ENV CC=/opt/rh/devtoolset-7/root/usr/bin/gcc
ENV CXX=/opt/rh/devtoolset-7/root/usr/bin/g++
# Manually install cmake 3.14
WORKDIR /opt
RUN wget https://cmake.org/files/v3.14/cmake-3.14.5.tar.gz && tar zxvf cmake-3.14.5.tar.gz && cd cmake-3.14.5 && ./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON && make -j8 && make install
RUN yum install -y epel-release
RUN yum install -y gflags-devel eigen3-devel suitesparse-devel glog-devel openblas-devel ceres-solver-devel \
zlib-devel libtiff-devel libraw-devel libjpeg-turbo-devel libpng-devel boost169-devel \
opencv-devel OpenImageIO-devel ilmbase-devel OpenEXR-devel
WORKDIR /tmp
RUN curl http://icl.utk.edu/projectsfiles/magma/downloads/magma-2.5.3.tar.gz > magma.tar.gz && tar xzf magma.tar.gz
WORKDIR /tmp/magma-build
RUN cmake /tmp/magma-2.5.3 && make -j8 && make install
ENV MAGMA_ROOT=/usr/local/magma
WORKDIR /tmp
RUN git clone https://github.com/pixel8earth/uncertaintyTE.git && cd uncertaintyTE && mkdir build && \
cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local -DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169 .. && \
make -j8 && make install
COPY . "${AV_DEV}"
WORKDIR "${AV_BUILD}"
RUN cmake "${AV_DEV}" -DALICEVISION_USE_UNCERTAINTYTE:BOOL=ON \
-DUNCERTAINTYTE_INCLUDE_DIR:PATH=/usr/local/include/uncertaintyTE \
-DUNCERTAINTYTE_LIBRARY=/usr/local/lib \
-DMAGMA_ROOT:PATH=/usr/local/magma \
-DBOOST_INCLUDEDIR=/usr/include/boost169 -DBOOST_LIBRARYDIR=/usr/lib64/boost169 \
-DAV_BUILD_SUITESPARSE:BOOL=OFF -DAV_BUILD_OPENCV:BOOL=OFF -DAV_BUILD_OPENGV:BOOL=ON \
-DAV_BUILD_LAPACK:BOOL=OFF -DAV_BUILD_JPEG:BOOL=OFF -DAV_BUILD_PNG:BOOL=OFF -DAV_BUILD_ZLIB:BOOL=OFF \
-DAV_BUILD_TIFF:BOOL=OFF -DAV_BUILD_LIBRAW:BOOL=OFF -DALICEVISION_USE_INTERNAL_CERES:BOOL=OFF \
-DAV_BUILD_CCTAG=OFF -DCMAKE_BUILD_TYPE=Release -DALICEVISION_BUILD_DEPENDENCIES:BOOL=ON \
-DINSTALL_DEPS_BUILD:BOOL=ON \
-DCMAKE_INSTALL_PREFIX="${AV_INSTALL}" \
-DCMAKE_BUILD_TYPE=Release \
-DALICEVISION_BUNDLE_PREFIX="${AV_BUNDLE}"
WORKDIR "${AV_BUILD}"
# RUN make -j8 zlib
# RUN make -j8 geogram
# RUN make -j8 tbb
# RUN make -j8 eigen
# RUN make -j8 opengv
# RUN make -j8 lapack
# RUN make -j8 suitesparse
# RUN make -j8 ceres
# RUN make -j8 openexr
# RUN make -j8 tiff
# RUN make -j8 png
# RUN make -j8 turbojpeg
# RUN make -j8 libraw
# RUN make -j8 boost
# RUN make -j8 openimageio
# RUN make -j8 alembic
# RUN make -j8 popsift
ENV LD_LIBRARY_PATH=/usr/local/lib:/usr/local/magma/lib:$LD_LIBRARY_PATH
RUN make -j8 install
RUN make bundle
# && cd /opt && rm -rf "${AV_BUILD}"
WORKDIR "${AV_BUNDLE}/share/aliceVision"
RUN wget https://gitlab.com/alicevision/trainedVocabularyTreeData/raw/master/vlfeat_K80L3.SIFT.tree
# FROM nvidia/cuda:${CUDA_TAG}-base-centos${OS_TAG}
# ENV AV_DEV=/opt/AliceVision_git \
# AV_BUILD=/tmp/AliceVision_build \
# AV_INSTALL=/opt/AliceVision_install \
# AV_BUNDLE=/opt/AliceVision_bundle \
# PATH="${PATH}:${AV_BUNDLE}" \
# VERBOSE=1
# RUN yum -y install deltarpm
# Install all compilation tools
# - file and openssl are needed for cmake
# RUN yum -y install \
# file \
# git \
# wget \
# unzip
# RUN yum install -y epel-release
# RUN yum install -y gflags eigen3 suitesparse glog openblas ceres-solver \
# zlib libtiff libraw opengv libjpeg-turbo libpng boost169 \
# opencv OpenImageIO ilmbase OpenEXR
# COPY --from=builder ${AV_BUNDLE} ${AV_BUNDLE}
# ENV LD_LIBRARY_PATH=${AV_BUNDLE}/lib:$LD_LIBRARY_PATH`