Docker setup working, but needs user fix and better readme

Former-commit-id: ce725e724b
pull/1161/head
Alex Hagiopol 2016-07-19 11:13:56 -07:00
rodzic 68addc2659
commit c880c0756e
4 zmienionych plików z 103 dodań i 63 usunięć

Wyświetl plik

@ -1,6 +1,11 @@
Dockerfile
tests/test_data
SuperBuild/build
SuperBuild/download
SuperBuild/install
SuperBuild/src
opensfm
pmvs
odm_orthophoto
odm_texturing
odm_meshing
odm_georeferencing
images_resize
build

Wyświetl plik

@ -1,61 +1,22 @@
FROM ubuntu:14.04
MAINTAINER Danilo Bargen <mail@dbrgn.ch>
#HELP FOR USERS: Replace example file paths with your own in the example commands below:
#BUILD COMMAND: docker build -t odm .
#AUTOMATIC RUN COMMAND:
# docker run -it --rm \
# -v $(pwd)/images:/code/images \
# -v $(pwd)/odm_orthophoto:/code/odm_orthophoto \
# -v $(pwd)/odm_texturing:/code/odm_texturing \
# --user odm_user
# odm_image
#MANUAL RUN COMMAND: docker run -it -v /home/alex/OpenDroneMap/images:/code/images --rm --entrypoint bash odm
#WORK INSIDE DOCKER IMAGE: docker run -it -v `pwd`:/code/ --rm --entrypoint bash odm
#REBUILD PACKAGES: docker build -t packages -f packages.Dockerfile .
# Env variables
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN apt-get update \
&& sudo apt-get remove libdc1394-22-dev \
&& apt-get install -y --install-recommends \
build-essential \
cmake \
git \
python-pip \
libgdal-dev \
libgeotiff-dev \
pkg-config \
libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
python-dev \
python-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libflann-dev \
libproj-dev \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev \
python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev \
python-empy \
python-nose \
python-pyside \
python-pyexiv2 \
python-scipy \
jhead \
liblas-bin \
&& apt-get autoremove \
&& apt-get clean
FROM packages
# Add users
RUN useradd -m -U odm
# Prepare directories
# Prepare directories`
RUN mkdir /code
WORKDIR /code
@ -67,14 +28,18 @@ RUN git submodule init && git submodule update
# Build OpenDroneMap
RUN bash ./configure.sh && \
mkdir build && cd build && cmake .. && make && cd .. && \
chown -R odm:odm /code
#Make build folder
RUN mkdir build && cd build && cmake .. && make
USER odm
ENV PYTHONPATH=${PYTHONPATH}:/code/SuperBuild/install/lib/python2.7/dist-packages:/code/SuperBuild/src/opensfm \
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/code/SuperBuild/install/lib
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
ENV SESSION="DDODMMAP_SESSION"
# Entry point
VOLUME ["/images"]
# WORKDIR /images
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/images"]
# VOLUME ["/code/images"]
ENTRYPOINT ["python", "/code/run.py", "--project-path", "/code/"]

Wyświetl plik

@ -128,8 +128,14 @@ You can also view the orthophoto GeoTIFF in QGIS or other mapping software:
#### Using Docker
You can build and run OpenDroneMap in a Docker container:
OpenDroneMap is Dockerized, meaning you can use containerization to build and run it without manually performing the
installation procedure described above and - most importantly - without tampering with the libraries and packages already
installed on your machine. Docker software is free to install and use in this context. If you don't have it installed,
see the [Docker Ubuntu installation tutorial] (https://docs.docker.com/engine/installation/linux/ubuntulinux/) and follow the
instructions up until "Create a Docker group" inclusive. Once Docker is installed, an OpenDroneMap Docker image can be created
as follows:
git clone
export IMAGES=/absolute/path/to/your/project
docker build -t opendronemap:latest .
docker run -v $IMAGES:/images opendronemap:latest

Wyświetl plik

@ -0,0 +1,64 @@
#Help for users:
#BUILD COMMAND EXAMPLE: docker build -t alex1 .
#AUTOMATIC RUN COMMAND EXAMPLE: docker run -it -v /home/alex/OpenDroneMap/images:/code/images --rm alex1
#MANUAL RUN COMMAND EXAMPLE: docker run -it -v /home/alex/OpenDroneMap/images:/code/images --rm --entrypoint bash alex1
FROM ubuntu:14.04
MAINTAINER Danilo Bargen <mail@dbrgn.ch>
MAINTAINER Alex Hagiopol <alex.hagiopol@icloud.com>
# Env variables
ENV DEBIAN_FRONTEND noninteractive
# Install dependencies
RUN apt-get update \
&& sudo apt-get remove libdc1394-22-dev \
&& apt-get install -y \
build-essential \
cmake \
git \
python-pip \
libgdal-dev \
libgeotiff-dev \
pkg-config \
libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
python-dev \
python-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libflann-dev \
libproj-dev \
libxext-dev \
liblapack-dev \
libeigen3-dev \
libvtk5-dev \
python-networkx \
libgoogle-glog-dev \
libsuitesparse-dev \
libboost-filesystem-dev \
libboost-iostreams-dev \
libboost-regex-dev \
libboost-python-dev \
libboost-date-time-dev \
libboost-thread-dev \
python-empy \
python-nose \
python-pyside \
python-pyexiv2 \
python-scipy \
jhead \
liblas-bin \
python-matplotlib \
libatlas-base-dev \
libatlas3gf-base
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python2.7/dist-packages"
ENV PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm"
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"