mapillary / OpenSfM

Open source Structure-from-Motion pipeline
https://www.opensfm.org/
BSD 2-Clause "Simplified" License
3.28k stars 843 forks source link

Docker Container Exits Immediately #779

Open walter-morawa opened 2 years ago

walter-morawa commented 2 years ago

Hello all,

I was able to successfully build an image from the Dockerfile.

sudo docker build .

image

Then, I run the docker image to create a container sudo docker run -d feb159d1a620

image

However, it appears to exit immediately, as I have no running containers, and everytime I run, it stops immediately.

image

Running docker logs seems to show no errors.

Ideally I want to attach to the container and run commands like:

bin/opensfm_run_all data/berlin

I know I am probably missing something pretty basic here, but I am a novice when it comes to Docker. Thanks so much in advance!

JorgeJimApa commented 1 year ago

@three-lives Did you manage to solve this issue? I seem to be having the same problem.

JorgeJimApa commented 1 year ago

I'm leaving this in case someone else has this problem. For me, running the docker image with the following command works:

docker run -it -p 8080:8080 opensfm

Where "opensfm" is the tag linked to my image (can be replaced by image-ID). This opens a bash with the container were I could successfully run the commands in the documentation and visualize the output in the browser. I am running OpenSfM in WSL2 - Ubuntu 20.04.

Loayaltal commented 11 months ago

I'm leaving this in case someone else has this problem. For me, running the docker image with the following command works:

docker run -it -p 8080:8080 opensfm

Where "opensfm" is the tag linked to my image (can be replaced by image-ID). This opens a bash with the container were I could successfully run the commands in the documentation and visualize the output in the browser. I am running OpenSfM in WSL2 - Ubuntu 20.04.

Thank you. This command does work on local containers; however, working on Azure the -it flag is unrecognized and the container exits immediately. Any idea on how to keep it running or at least some way or another to upload images per request for OpenSfM to reconstruct on Azure?

xIgnition commented 8 months ago

I got around this by starting the runner like this inside of my dockerfile

# Set Script Values RUN export RUNNER_ALLOW_RUNASROOT="1"

# Connect to GitHub RUN RUNNER_ALLOW_RUNASROOT="1" ./config.sh --url https://github.com/xIgnition/ <repo> --token <token> --unattended

# Start the Runner RUN RUNNER_ALLOW_RUNASROOT="1" ./run.sh