Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added tested Dockerfile #29

Merged
merged 1 commit into from
Apr 21, 2017
Merged

added tested Dockerfile #29

merged 1 commit into from
Apr 21, 2017

Conversation

timkock
Copy link

@timkock timkock commented Oct 11, 2016

Thought this was missing a Dockerfile and #17 seemed to have some interest so decided to create one. Currently using this for some quick annotations.

from docker hub

mkdir -p ~/Desktop/annotate/Images
mkdir -p ~/Desktop/annotate/Annotations
docker run -d --name annotate -p 1337:80 -v ~/Desktop/annotate/Images:/var/www/html/Images -v ~/Desktop/annotate/Annotations:/var/www/html/Annotations jungleai/annotate:latest

from dockerfile
You can also build your own image from this Dockerfile and do the following

docker build -t yourorganisation/yourimagename:latest .
mkdir -p ~/Desktop/annotate/Images
mkdir -p ~/Desktop/annotate/Annotations
docker run -d --name annotate -p 1337:80 -v ~/Desktop/annotate/Images:/var/www/html/Images -v ~/Desktop/annotate/Annotations:/var/www/html/Annotations yourorganisation/yourimagename:latest

In either case use local folders as you like but running works with attaching host folders the container. In this way if you were to follow the example above and place a folder called logos in ~/Desktop/annotate/Images and you dump .jpg files in that folder. Then when running the container navigate to http://localhost:1337/tool.html?mode=f&folder=logos to start annotating. You will find the xml's in ~/Desktop/annotate/Annotations/logos.

@fagg
Copy link

fagg commented Oct 11, 2016

(How ironic that I go looking to run LabelMe inside Docker and find this committed only a few minutes before)

The current Docker image from Docker hub does not seem to work. This is all I get:

screen shot 2016-10-11 at 12 20 11

I tried a couple of other images and Chrome occasionally pops up with an error from "fetch_images.cgi". Though it doesn't actually say what the error is.

@timkock
Copy link
Author

timkock commented Oct 11, 2016

hi @fagg check the folder query string, does that folder exist (if you have mapped volumes as I wrote then it won't work) if not then yes most likely

@fagg
Copy link

fagg commented Oct 11, 2016

So this is what I tried.

I recreated the Docker as per:

screen shot 2016-10-11 at 12 53 31 1

The folder exists:

screen shot 2016-10-11 at 12 54 24

If I bring up the browser, it just hangs:

screen shot 2016-10-11 at 12 56 05

@timkock
Copy link
Author

timkock commented Oct 11, 2016

Hi @fagg, I removed all local images and ran the pull from dockerhub fresh on a different computer with a different folder and images, the screenshot below shows all steps & result in one.
screenshot 2016-10-11 19 09 11

@fagg
Copy link

fagg commented Oct 11, 2016

Thanks for your help, but still not working. I followed your steps exactly
and still the same thing.

On 11 October 2016 at 13:10, Tim Kock notifications@github.com wrote:

Hi @fagg https://github.com/fagg, I removed all local images and ran
the pull from dockerhub fresh on a different computer with a different
folder and images, the screenshot below shows all steps & result in one.
[image: screenshot 2016-10-11 19 09 11]
https://cloud.githubusercontent.com/assets/5517498/19280465/4fb01140-8fe6-11e6-8e11-c0db1d79588d.png


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#29 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABqWhCnQ9_rgHB5YP5HMdMC23FQaXE0cks5qy8L4gaJpZM4KTw3g
.

@timkock
Copy link
Author

timkock commented Oct 11, 2016

Wow thats totally weird, I wanna help you out man but don't know what I can do from here... I checked this on two other macs and it worked fine. Have you checked the following perhaps?

  • you have your docker up to date (latest version)
  • your folders and images have the right permissions
  • you are running docker with the right permissions
  • checked upper/lower caps of the commands?

The last thing I can think of for you to try is docker run -d --name plaintest -p 1337:80 jungleai/annotate:latest and to go directly to http://localhost:1337/tool.html?collection=LabelMe&mode=i&folder=example_folder&image=img1.jpg. This works straight out of the box. Without any alterations on your local file system.

@fagg
Copy link

fagg commented Oct 11, 2016

Hmm, okay, that works.

I'm running Ubuntu 16.04.
Docker version 1.12.1, build 23cf638

My user is in the docker group, so this seems fine. The folder that I am linking to is inside my home directory, so I should be able to read/write.
screen shot 2016-10-11 at 14 05 35

@timkock
Copy link
Author

timkock commented Oct 11, 2016

Right then it's something weird with the mounted volumes. I guess just experiment on that, check the commands thoroughly. I am not sure if mounting host folders is different in Ubuntu 16.04 with Docker, maybe stackoverflow that... ? Just searching quickly found this, maybe it's related?

moby/moby#22828

@fagg
Copy link

fagg commented Oct 11, 2016

I gave up and just built my own Docker image with all of the data I need inside of it. Thanks anyway.

@timkock
Copy link
Author

timkock commented Oct 11, 2016

Haha ok! Ill check tomorrow on a server we have that is running 16.04 see if I can replicate it failing. Hope the Dockerfile at least gave some inspiration

@fagg
Copy link

fagg commented Oct 11, 2016

It was very useful, thanks.

@ortizeg
Copy link

ortizeg commented Nov 15, 2016

@timkock I thought I might add that I'm on Mac OS X El Capitan. If I download your Dockerfile and build it locally, I get the error @fagg gets. However, if I just grab your image from docker hub everything works perfectly fine. Did you do any additional edits to your Dockerfile locally before uploading the image?

@ortizeg
Copy link

ortizeg commented Nov 17, 2016

I think I made a mistake configuring the apache server. So, a not for others, make sure you get everything that's in ubuntu.conf.

@ortizeg
Copy link

ortizeg commented Nov 17, 2016

Also, I recommend copying over the directory instead of doing a git clone. This would ensure somebody who is actively developing a local copy of the repo can test it out quickly. Something like:

RUN rm -rf /var/www/html && \
    mkdir /var/www/html
COPY . /var/www/html
RUN chown -R ${APACHE_RUN_USER}:${APACHE_RUN_GROUP} /var/www

to replace the portion under deploy repo.

@timkock
Copy link
Author

timkock commented Nov 17, 2016

hi @ortizeg thanks for all your input. We didn't make any adjustments to the docker file in the hub beyond whats in this repo. We are currently building an annotation tool that will learn whilst annotating to start suggesting segmentations in a little more intuitive way than this system. That is why this tool is not getting a lot of attention from us at the moment. Did you manage to run it in a docker file in the end? Still want to help out people wanting to use this tool with Docker

@ortizeg
Copy link

ortizeg commented Nov 17, 2016

I did get it working. Thanks!

That sounds great! Do you guys have an ETA? And I assume this'll be a pay for use application?

@timkock timkock closed this Nov 17, 2016
@timkock timkock reopened this Nov 17, 2016
@ahaque
Copy link

ahaque commented Mar 3, 2017

This works for me.

@brussell123 brussell123 merged commit b514581 into CSAILVision:master Apr 21, 2017
@danvass
Copy link

danvass commented May 3, 2017

@timkock I used the first example you gave to run it and it works but when finishing annotating it always gets a server error when trying to do submit.cgi.

EDIT: Turns out needed to set correct permissions on the Images and Annotations folder.

@ghost
Copy link

ghost commented May 22, 2017

How can we run this docker on aws ec2 instance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants