rhsimplex / image-match

🎇 Quickly search over billions of images
2.94k stars 405 forks source link

Dockerfile does not create ElasticSearch server #65

Open advance512 opened 7 years ago

advance512 commented 7 years ago

Documentation says:

We have a Docker image that takes care of setting up image_match and elasticsearch

Looking in the Dockerfile and setup.py, I see no creation of an ElasticSearch container.

Perhaps the documentation should mention it only creates a containerized environment where you can use the Python REPL for execute programs that use the image-match and elasticsearch libraries.

I would suggest, however, that adding an explanation on how you can create an ElasticSearch container:

docker run -P -d elasticsearch

And possibly linking it (or whatever is relevant in the latest Docker version) to the created image-match container can be a lot more useful.

At the very least, a better explanation on the expected usage pattern of this container should be added.

rhsimplex commented 7 years ago

Hi @advance512,

It's possible the documentation didn't keep up here. I'm on vacation until late next week, but I'll have a look when I get back and either update the dockerfile per your suggestion, or remove the offending documentation =)

Until then, I encourage you to look into https://github.com/pavlovai/match -- the folks at pavlov have done some work making a containerized version.

glentsch commented 6 years ago

You are right that this does not start an Elasticsearch container. While this is not in the documentation, here is a guide for anyone:

docker network create image-match-network
docker run --name elastic_search -d -p 9200:9200 -p 9300:9300 --network image-match-network -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.3.0
docker run -it --name image-match -e "ELASTIC_URL=elastic_search --network image-match-network ascribe/image-match /bin/bash

This will allow the two dockers to be on the same network, elasticsearch ports open.
Then when instantiating Elasticsearch:

es = Elasticsearch([os.environ['ELASTIC_URL']]])