jina-ai / jina-hub

An open-registry for hosting Jina executors via container images
Apache License 2.0
105 stars 48 forks source link

Docker image pod can't work properly #330

Closed YueLiu1415926 closed 4 years ago

YueLiu1415926 commented 4 years ago

Say for MinRanker, I run docker build -t minranker . docker run minranker then there will be an error saying 'could not determine a constructor for the tag !MinRanker'. The problem is for almost all executors, same error appears not only in docker run, also when using them in examples.

This could be solved adding

metas:
  py_modules: __init__.py

to the config.yml

For reference, docker run -it --entrypoint=/bin/bash minranker can entry the container to check

┆Issue is synchronized with this Jira Task by Unito

JoanFM commented 4 years ago

I think it must be due to the jina image it has been built with? Can u try docker run minranker --uses !BaseExecutor and then connect to the docker container to check the jina version installed there?

YueLiu1415926 commented 4 years ago

it's jina 0.5.0, no problem with jina or python's version

YueLiu1415926 commented 4 years ago

The problem is PROBABLY because that we didn't install hub in docker image, and the config.yml don't attempt to find executor in current path. So we need py_modules: to assign it