forked from alicevision/AliceVision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
82 lines (69 loc) · 2.41 KB
/
Dockerfile
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
ARG CUDA_TAG=9.2
ARG OS_TAG=7
ARG NPROC=8
FROM nvidia/cuda:${CUDA_TAG}-devel-centos${OS_TAG}
LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com"
# 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
COPY . "${AV_DEV}"
WORKDIR "${AV_BUILD}"
RUN cmake "${AV_DEV}" -DAV_BUILD_CCTAG=OFF -DCMAKE_BUILD_TYPE=Release -DALICEVISION_BUILD_DEPENDENCIES:BOOL=ON -DINSTALL_DEPS_BUILD:BOOL=ON -DCMAKE_INSTALL_PREFIX="${AV_INSTALL}" -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
RUN make -j8 install && 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