diff --git a/Dockerfile b/Dockerfile index 30ade6e6d..73eeb2800 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,58 +1,5 @@ -FROM ubuntu:14.04 +FROM paulinus/opensfm-docker-base - -# Install apt-getable dependencies -RUN apt-get update \ - && apt-get install -y \ - build-essential \ - cmake \ - git \ - libatlas-base-dev \ - libboost-python-dev \ - libeigen3-dev \ - libgoogle-glog-dev \ - libopencv-dev \ - libsuitesparse-dev \ - python-dev \ - python-numpy \ - python-opencv \ - python-pip \ - python-pyexiv2 \ - python-pyproj \ - python-scipy \ - python-yaml \ - wget \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - - -# Install Ceres from source -RUN \ - mkdir -p /source && cd /source && \ - wget http://ceres-solver.org/ceres-solver-1.10.0.tar.gz && \ - tar xvzf ceres-solver-1.10.0.tar.gz && \ - cd /source/ceres-solver-1.10.0 && \ - mkdir -p build && cd build && \ - cmake .. -DCMAKE_C_FLAGS=-fPIC -DCMAKE_CXX_FLAGS=-fPIC -DBUILD_EXAMPLES=OFF -DBUILD_TESTING=OFF -DOPENMP=OFF && \ - make install && \ - cd / && \ - rm -rf /source/ceres-solver-1.10.0 && \ - rm -f /source/ceres-solver-1.10.0.tar.gz - - -# Install opengv from source -RUN \ - mkdir -p /source && cd /source && \ - git clone https://github.com/paulinus/opengv.git && \ - cd /source/opengv && \ - mkdir -p build && cd build && \ - cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON && \ - make install && \ - cd / && \ - rm -rf /source/opengv - - -# OpenSfM COPY . /source/OpenSfM WORKDIR /source/OpenSfM diff --git a/README.md b/README.md index 319aeec5f..521695662 100644 --- a/README.md +++ b/README.md @@ -48,12 +48,12 @@ Be sure to update your `PYTHONPATH` to include `/usr/local/lib/python2.7/site-pa ### Installing dependencies on Ubuntu -See the [Dockerfile](https://github.com/mapillary/OpenSfM/blob/master/Dockerfile) for the commands to install all dependencies on Ubuntu 14.04. The steps are +See this [Dockerfile](https://github.com/paulinus/opensfm-docker-base/blob/master/Dockerfile) for the commands to install all dependencies on Ubuntu 14.04. The steps are 1. Install [OpenCV][], [Boost Python][], [NumPy][], [SciPy][] using apt-get 2. Install python requirements using pip 3. Clone, build and install [OpenGV][] following the receipt in the Dockerfile - 4. [Build and Install](http://ceres-solver.org/building.html) the [Ceres solver][] from its source using the `-fPIC` compilation flag + 4. [Build and Install](http://ceres-solver.org/building.html) the [Ceres solver][] from its source using the `-fPIC` compilation flag. #### Install note