OpenSFM setup.py file returning error after building via Docker

I am having an issue building OpenSFM. I am getting an error from running the setup.py file.

First, I am running Ubuntu 16.04 on VirtualBox. I installed Docker and ran

docker pull freakthemighty/opensfm

This image was successfully built.

Additionally, I cloned the OpenSFM repository from here into my home folder.

Next, I am supposed to build by running this in the main folder:

python setup.py build

This is the resulting error

walter@VirtualUbuntu:~$ python setup.py build
Configuring...
Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    subprocess.Popen(['cmake','../opensfm/src'], cwd='cmake_build').wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Here is the setup.py file in question.

Hi @walter,

there are two ways of running opensfm, with or without docker.

If you want to use docker, then there is no need to run python setup.py build. Instead build the docker image using

cd path/to/OpenSfM
docker build -t mapillary/opensfm .

then run using

docker run -ti mapillary/opensfm /bin/sh -c "bin/run_all data/berlin"

Note that this will create the reconstruction inside the docker container. You will need some docker knowledge to map a local folder to a folder inside the docker image so that we can access the results outside.

The other option is not to use docker. In this case, you will need to install the dependencies on your ubuntu machine see https://github.com/mapillary/OpenSfM#installing-dependencies-on-ubuntu . After doing that you will be able to run python setup.py build

hope this helps,
pau

Hello I am trying to run the berlin dataset for reconstruction using
docker run -ti mapillary/opensfm /bin/sh -c “bin/run_all data/berlin” but there is a error
/bin/sh: 1: bin/opensfm_run_all: not found

I saw yiou mentioned to use python3 as last argument but still same error.

docker run -ti opensfm1 /bin/sh -c “bin/opensfm_run_all data/berlin” python3

python3: 1: python3: bin/opensfm_run_all: not found