OpenSfM icon indicating copy to clipboard operation
OpenSfM copied to clipboard

Docker Container Exits Immediately

Open walter-morawa opened this issue 3 years ago • 4 comments

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!

walter-morawa avatar Aug 09 '21 02:08 walter-morawa

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

JorgeJimApa avatar Sep 27 '22 16:09 JorgeJimApa

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.

JorgeJimApa avatar Sep 29 '22 10:09 JorgeJimApa

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?

Loayaltal avatar Aug 03 '23 02:08 Loayaltal

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

xIgnition avatar Nov 06 '23 08:11 xIgnition