forked from alicevision/AliceVision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_deps
88 lines (76 loc) · 2.84 KB
/
Dockerfile_deps
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
ARG CUDA_VERSION=9.0
ARG OS_VERSION=7
ARG NPROC=1
FROM nvidia/cuda:${CUDA_VERSION}-devel-centos${OS_VERSION}
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/AliceVisionDeps_git \
AV_BUILD=/tmp/AliceVisionDeps_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 centos-release-scl
RUN yum -y install \
devtoolset-6 \
devtoolset-6-make \
devtoolset-6-gcc-gfortran \
file \
git \
wget \
unzip \
yasm \
pkg-config \
libtool \
nasm \
automake \
openssl-devel
# Okay, change our shell to specifically use our software collections.
# (default was SHELL [ "/bin/sh", "-c" ])
# https://docs.docker.com/engine/reference/builder/#shell
#
# See also `scl` man page for enabling multiple packages if desired:
# https://linux.die.net/man/1/scl
# SHELL [ "/usr/bin/scl", "enable", "devtoolset-6" ]
ENV PATH="/opt/rh/devtoolset-6/root/usr/bin:${PATH}" \
LD_LIBRARY_PATH="/opt/rh/devtoolset-6/root/usr/lib:/opt/rh/devtoolset-6/root/usr/lib64:/opt/rh/devtoolset-6/root/usr/lib64/dyninst:${LD_LIBRARY_PATH}" \
MAKE=/opt/rh/devtoolset-6/root/usr/bin/make
# Manually install cmake 3.16
WORKDIR /opt
RUN wget https://cmake.org/files/v3.16/cmake-3.16.3.tar.gz && tar zxvf cmake-3.16.3.tar.gz && cd cmake-3.16.3 && ./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON && make -j8 && make install
WORKDIR "${AV_BUNDLE}/share/aliceVision"
RUN wget https://gitlab.com/alicevision/trainedVocabularyTreeData/raw/master/vlfeat_K80L3.SIFT.tree
COPY . "${AV_DEV}"
WORKDIR "${AV_BUILD}"
RUN cmake "${AV_DEV}" -DCMAKE_BUILD_TYPE=Release -DALICEVISION_BUILD_DEPENDENCIES:BOOL=ON -DAV_BUILD_ALICEVISION:BOOL=OFF -DCMAKE_INSTALL_PREFIX="${AV_INSTALL}" -DALICEVISION_BUNDLE_PREFIX="${AV_BUNDLE}"
WORKDIR "${AV_BUILD}"
# RUN make zlib
# RUN make geogram
# RUN make tbb
# RUN make eigen
# RUN make opengv
# RUN make lapack
# RUN make suitesparse
# RUN make ceres
# RUN make openexr
# RUN make tiff
# RUN make png
# RUN make turbojpeg
# RUN make libraw
# RUN make boost
# RUN make openimageio
# RUN make alembic
# RUN make popsift
RUN make install && mv ${AV_INSTALL}/bin ${AV_INSTALL}/bin_deps
# && cd /opt && rm -rf "${AV_BUILD}"