Skip to content

Commit

Permalink
describe how to build and use docker images (#1049)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #1049

Reviewed By: paulinus

Differential Revision: D57765801

Pulled By: fabianschenk

fbshipit-source-id: 6aa8c2678ac0007d42baa410b43077d4cccdd9ad
  • Loading branch information
sepastian authored and facebook-github-bot committed Jun 3, 2024
1 parent 5b32e38 commit 40b73c0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
12 changes: 11 additions & 1 deletion doc/source/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ Once the dependencies have been installed, you can build OpenSfM by running the

python3 setup.py build

Building Docker images
----------------------

Once dependencies have been installed, you can build OpenSfM Docker images by running the following command from the main folder::

docker build -t opensfm -f Dockerfile .

To build an image using the Ceres 2 solver, use::

docker build -t opensfm:ceres2 -f Dockerfile.ceres2 .

Building the documentation
--------------------------
Expand All @@ -131,4 +141,4 @@ and browse `http://localhost:8000/ <http://localhost:8000/>`_
.. _git: https://git-scm.com/
.. _cmake: https://cmake.org/
.. _Visual Studio 2019: https://visualstudio.microsoft.com/downloads/
.. _Python 3.8: https://www.microsoft.com/en-us/p/python-38/9mssztt1n39l
.. _Python 3.8: https://www.microsoft.com/en-us/p/python-38/9mssztt1n39l
15 changes: 15 additions & 0 deletions doc/source/using.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ An example dataset is available at ``data/berlin``. You can reconstruct it by r

This will run the entire SfM pipeline and produce the file ``data/berlin/reconstruction.meshed.json`` as output.

Running in Docker
'''''''''''''''''

First, build the OpenSfM Docker image, as described under "building".


Then, start a Docker container. The following command mounts the `data/` folder to `/data/` inside the Docker container::

docker run -it -p 8080:8080 -v ${PWD}/data/:/data/ opensfm:ceres2

Once inside the running Docker container, start the reconstruction process with the usual command::

bin/opensfm_run_all /data/berlin/

When done, exit the container by pressing Ctrl+d. The model generated will be available in the `data/` catalogue.

Viewer setup
''''''''''''
Expand Down

0 comments on commit 40b73c0

Please sign in to comment.