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

Issues with Python in Docker container #23

Closed
stigmhenriksen opened this issue Dec 20, 2017 · 4 comments
Closed

Issues with Python in Docker container #23

stigmhenriksen opened this issue Dec 20, 2017 · 4 comments
Labels

Comments

@stigmhenriksen
Copy link

Description

I do have some issues running server side extension in docker. The building of the docker files runs fine. per your instructions.
However, when running the image I get a Python error. I'm running docker in CentOS I have also tested this in Ubuntu - still receiving the same error.

Steps to Reproduce

  1. download the zip file and unzip it in correct directory
  2. build the image with:
    -docker build -t qlik-oss/sse-helloworld -f Dockerfile.helloworld .
    The build runs fine
  3. Run the image

sseissues
docker run --rm -p 50052:50052 qlik-oss/sse-helloworld

Actual behavior

Gets and error, see attached screenshot

Environment

Docker

Operating system

CentOS and Ubunut 16.04

Qlik Sense

[ ] Desktop

Versions

  • Qlik Sense November 2017 release
@tobiaslindulf
Copy link
Contributor

Hi,
It looks like you may have ended up with an older python version than 3.4.1 in the docker container. That is what we believe when reading this: https://docs.python.org/3/library/os.html#os.makedirs .
We do not know the reason for this, but it might be worth to try to force the python version to at least 3.5.
It might be the base docker image "grpc/python" that is changed or something.
Can you try to exchange the content in the docker file to the following instead and try again?

FROM python:3.6.2-jessie

ADD . /app

RUN pip install grpcio && pip install numpy

WORKDIR /app
ENTRYPOINT ["python"]
CMD ["ColumnOperations/ExtensionService_column.py"]
EXPOSE 50053

@stigmhenriksen
Copy link
Author

HI ,
Build runs fine, but now I'm getting another error when starting the container.
Moreover, when starting the service in Docker swarm it does not converge. I can see that are are some issues with 1.8 version of Grpc and that 1.7.3 version should be used.

Please advice

image

@kjartan-qlik
Copy link
Contributor

Hi @stigmhenriksen, thanks for the update. I've gotten the docker file to build and run on a Debian VM with the following content.

FROM python:3.6

WORKDIR /app
ADD . /app

RUN pip install --trusted-host pypi.python.org -r requirements.txt

EXPOSE 50052

CMD ["python", "HelloWorld/ExtensionService_helloworld.py"]

If you wish to force the version of grpcio then you can do so in the requirements.txt. We will update our docker files soon to fix this issue.

@stigmhenriksen
Copy link
Author

Hi,
Now it is working, I'm using the following docker script:
FROM python:3.6.2-jessie

ADD . /app

ENV GRPCIO_VERSION 1.7.3

RUN pip install grpcio==${GRPCIO_VERSION}
&& pip install numpy

WORKDIR /app
ENTRYPOINT ["python"]
CMD ["HelloWorld/ExtensionService_helloworld.py"]
EXPOSE 50052

Thanks for your support and swift feedback

kjartan-qlik added a commit that referenced this issue Dec 22, 2017
Also bump the version of grpcio package to 1.7.3

Issue #23
@kjartan-qlik kjartan-qlik self-assigned this Dec 22, 2017
@kjartan-qlik kjartan-qlik removed their assignment Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants