Support deployment of a Python 3 model
I was looking at deploying one of the examples (iris) using Python 3 but I don't think its possible to do it at the moment.
I changed the base image using --base-image=python:3 but because of one of the requirements in seldon_requirements.txt more specifically grpc the image cannot be built since that library only works on python 2.
Step 14/19 : RUN cd /tmp && pip install --no-cache-dir -r seldon_requirements.txt && pip install --no-cache-dir -r requirements.txt
---> Running in ee334e1dbc4f
Collecting numpy==1.11.2 (from -r seldon_requirements.txt (line 1))
Downloading numpy-1.11.2.tar.gz (4.2MB)
Collecting pandas==0.18.1 (from -r seldon_requirements.txt (line 2))
Downloading pandas-0.18.1.tar.gz (7.3MB)
Collecting grpc==0.3.post19 (from -r seldon_requirements.txt (line 3))
Downloading grpc-0.3-19.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-he7l6xxx/grpc/setup.py", line 7, in <module>
version_tuple = __import__('grpc').VERSION
File "/tmp/pip-build-he7l6xxx/grpc/grpc/__init__.py", line 6, in <module>
from .rpc import *
File "/tmp/pip-build-he7l6xxx/grpc/grpc/rpc.py", line 141
except OSError, ex:
^
SyntaxError: invalid syntax
I was also wondering if this requirement might be easy to remove since this is another RPC library and not grpc.io, thats is also in the list of seldon_requirements.txt.
You are right. Not sure why we need both? @Maximophone
I'm looking into this requirement. However the wrapper is not currently compatible with python 3 and there will be other issues. I'll be working on making it compatible.
I can confirm that grpc==0.3.post19 can be dropped from the requirements, it was added by mistake.
I have created a pull request (#94 ) for an update that makes the wrapper python 3 compatible.
I have also pushed a new docker image for the wrapper: seldonio/core-python-wrapper:0.7
@danielfrg it would be great if you could try again using this new wrapper to see if you still run into compatibility issues.
I will and report back!
Thanks for fixing this so fast :)
No problem, python 3 compatibility is very important and has been overlooked, we need to get this working asap ;)
I tested the new wrapper with 2 python 3 models and everything seams to be working fine 👍
Great, we will merge the pull request and close this issue.