-
-
Notifications
You must be signed in to change notification settings - Fork 831
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #466 from alicevision/dev_docker2
[Docker] New docker support
- Loading branch information
Showing
11 changed files
with
881 additions
and
108 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,58 @@ | ||
FROM ubuntu:14.04 | ||
|
||
# Add openMVG binaries to path | ||
ENV PATH $PATH:/opt/openMVG_Build/install/bin | ||
|
||
# Get dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
cmake \ | ||
graphviz \ | ||
git \ | ||
gcc-4.8 \ | ||
gcc-4.8-multilib \ | ||
libpng-dev \ | ||
libjpeg-dev \ | ||
libtiff-dev \ | ||
libxxf86vm1 \ | ||
libxxf86vm-dev \ | ||
libxi-dev \ | ||
libxrandr-dev \ | ||
python-dev \ | ||
python-pip | ||
|
||
# Clone the openvMVG repo | ||
ADD . /opt/openMVG | ||
RUN cd /opt/openMVG && git submodule update --init --recursive | ||
|
||
# Build | ||
RUN mkdir /opt/openMVG_Build && cd /opt/openMVG_Build && cmake -DCMAKE_BUILD_TYPE=RELEASE \ | ||
-DCMAKE_INSTALL_PREFIX="/opt/openMVG_Build/install" -DOpenMVG_BUILD_TESTS=ON \ | ||
-DOpenMVG_BUILD_EXAMPLES=ON . ../openMVG/src/ && make | ||
|
||
RUN cd /opt/openMVG_Build && make test | ||
ARG CUDA_TAG=7.0 | ||
ARG OS_TAG=7 | ||
ARG NPROC=1 | ||
FROM nvidia/cuda:${CUDA_TAG}-devel-centos${OS_TAG} | ||
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 | ||
|
||
# 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 | ||
|
||
# Manually install cmake 3.11 | ||
WORKDIR /opt | ||
RUN wget https://cmake.org/files/v3.11/cmake-3.11.0.tar.gz && tar zxvf cmake-3.11.0.tar.gz && cd cmake-3.11.0 && ./bootstrap --prefix=/usr/local -- -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_USE_OPENSSL:BOOL=ON && make -j8 && make install | ||
|
||
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}" | ||
|
||
COPY . "${AV_DEV}" | ||
|
||
WORKDIR "${AV_BUILD}" | ||
RUN cmake "${AV_DEV}" -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 -j${NPROC} 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
ARG CUDA_TAG=9.2 | ||
ARG OS_TAG=18.04 | ||
ARG NPROC=1 | ||
FROM nvidia/cuda:${CUDA_TAG}-devel-ubuntu${OS_TAG} | ||
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 | ||
|
||
# Install all compilation tools | ||
RUN apt-get clean && \ | ||
apt-get update | ||
RUN apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cmake \ | ||
git \ | ||
wget \ | ||
unzip \ | ||
yasm \ | ||
pkg-config \ | ||
libtool \ | ||
nasm \ | ||
automake \ | ||
gfortran | ||
|
||
# rm -rf /var/lib/apt/lists/* | ||
|
||
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}" | ||
|
||
COPY . "${AV_DEV}" | ||
|
||
|
||
# Cannot get rig of this error on lapack build on Ubuntu, so use system libraries for lapack/suitesparse: | ||
#CMake Error at BLAS/SRC/cmake_install.cmake:53 (file): | ||
# file INSTALL cannot find | ||
# "/tmp/AliceVision_build/external/lapack_build/lib/libblas.so.3.8.0". | ||
#Call Stack (most recent call first): | ||
# BLAS/cmake_install.cmake:46 (include) | ||
# cmake_install.cmake:72 (include) | ||
RUN apt-get install -y --no-install-recommends liblapack-dev libsuitesparse-dev | ||
|
||
WORKDIR "${AV_BUILD}" | ||
RUN cmake "${AV_DEV}" -DCMAKE_BUILD_TYPE=Release -DALICEVISION_BUILD_DEPENDENCIES:BOOL=ON -DAV_BUILD_LAPACK:BOOL=OFF -DAV_BUILD_SUITESPARSE:BOOL=OFF -DCMAKE_INSTALL_PREFIX="${AV_INSTALL}" -DALICEVISION_BUNDLE_PREFIX="${AV_BUNDLE}" | ||
|
||
WORKDIR "${AV_BUILD}" | ||
RUN make -j${NPROC} 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.