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

seldonio/seldon-core-s2i-python3-tf-gpu:0.15 image default python version is 2.7.17 #1324

Closed
ford-mach1ml opened this issue Jan 8, 2020 · 5 comments
Assignees
Milestone

Comments

@ford-mach1ml
Copy link

Built an image with seldonio/seldon-core-s2i-python3-tf-gpu:0.15 as the base image, with requirements.txt that includes xgboost==0.82 (got an error trying to use xgboost==0.90, which may have been related to this issue.)

Upon deploying a model with the created image, got this error: ModuleNotFoundError: No module named 'xgboost'

Doing kubectl exec into the pod, it appears that xgboost is getting installed for python2, not python3:

root@confident-edge-xgboost-deployment-default-dd7d9aa-6f64776dvwvlq:/microservice# python --version
Python 2.7.17
root@confident-edge-xgboost-deployment-default-dd7d9aa-6f64776dvwvlq:/microservice# python3 --version
Python 3.6.9
root@confident-edge-xgboost-deployment-default-dd7d9aa-6f64776dvwvlq:/microservice# python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import xgboost
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'xgboost'
>>> exit()
root@confident-edge-xgboost-deployment-default-dd7d9aa-6f64776dvwvlq:/microservice# python 
Python 2.7.17 (default, Nov  7 2019, 10:07:09) 
[GCC 7.4.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xgboost
>>> xgboost.__version__
'0.82'
>>> exit()
@axsaucedo axsaucedo added this to the 1.1 milestone Jan 13, 2020
@RafalSkolasinski
Copy link
Contributor

RafalSkolasinski commented Jan 14, 2020

Thanks for submitting the issue. I can confirm that there is indeed a problem with the seldon-core-s2i-python3-tf-gpu.

I was able to pin it to the fact that our regular python images uses as their base e.g. python:3.7 whereas the gpu image uses nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04.

In python images pip always points to the right executable and on Ubuntu 18.04 unfortunately pip and pip3 refers to python 2 and python 3 respectively.

While we work on the solution for this as the workaround you could build your own base image (base it on our GPU image) and pip3 install whatever you need. This way you will make sure that it gets installed into the Python 3 site-packages. You can look at the outlier example where we do something similar (see Dockerfile and Makefile).

@RafalSkolasinski
Copy link
Contributor

@axsaucedo As we build this image as python3 why do we even install Python 2 there?

RUN apt-get install -y python-pip python-dev build-essential

As a fix to this we could not install Python 2 and just symlink pip and python to pip3 and python3 - making it exclusively Python 3 image. As neither of those is present in the base image this shouldn't break anything critical.

Other solution would be to setup some environmental variables and modify assemble script accordingly to use pip3 instead of pip.

@RafalSkolasinski
Copy link
Contributor

I open a PR that solves it using symlinks.

@RafalSkolasinski
Copy link
Contributor

@ford-mach1ml The fix for this issue has been merged to master.
Updated image has been uploaded to docker hub as seldonio/seldon-core-s2i-python3-tf-gpu:0.16-SNAPSHOT and will be part of 0.16 release.

Please, give it a shot and reopen the issue in case it does not solve your problem.

glindsell pushed a commit to glindsell/seldon-core that referenced this issue Jan 15, 2020
glindsell pushed a commit that referenced this issue Jan 15, 2020
* 1297 WIP Update Analytics Helm Chart

Signed-off-by: glindsell <[email protected]>

* Update README.md

ns: seldon -> seldon-system

* first try

* add preprocessor and structure notebook

* pack outlier detection into seldon deployment

* add endpoint that combines the classification and outlier detection

* polish example and return outliers score via tags

* cleanup model wrapper

* push alternative layout of the example

* add combiner to the example

* add comments in new notebook

* use jsonData instead of strData for return values

* add logging

* introduce base image to optimize s2i builds

* remove redundant version of the example

* adjust image names

* add images and remove output from requirement installation cells

* Bump pillow from 6.2.0 to 7.0.0 in /python

Bumps [pillow](https://github.com/python-pillow/Pillow) from 6.2.0 to 7.0.0.
- [Release notes](https://github.com/python-pillow/Pillow/releases)
- [Changelog](https://github.com/python-pillow/Pillow/blob/master/CHANGES.rst)
- [Commits](python-pillow/Pillow@6.2.0...7.0.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Bump okhttp from 4.2.2 to 4.3.0 in /engine

Bumps [okhttp](https://github.com/square/okhttp) from 4.2.2 to 4.3.0.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.2.2...parent-4.3.0)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* Automatically find deployment names in e2e tests, closes #820

New approach is based on getting deyployment names directly from
SeldonDeployment objects. This allow to avoid hard-coded hashes in
test scripts.

* set deployment replicas

* Use https for training set

* Remove log4j from pom

* Update link

* apply fix to other tests and iterate over deployments in wait_for_rollout

* adjust to tests being run with Python 3.6

* remove note about missing graph, add nblink

* modify local operator tests to use proper namespace and run helm uninstall at the end

* update to new kind

* request ephemeral storage

* exception should be logged

* Bump okhttp from 4.3.0 to 4.3.1 in /engine

Bumps [okhttp](https://github.com/square/okhttp) from 4.3.0 to 4.3.1.
- [Release notes](https://github.com/square/okhttp/releases)
- [Changelog](https://github.com/square/okhttp/blob/master/CHANGELOG.md)
- [Commits](square/okhttp@parent-4.3.0...parent-4.3.1)

Signed-off-by: dependabot-preview[bot] <[email protected]>

* operator build test

* 1297 WIP Update Analytics Helm Chart

Signed-off-by: glindsell <[email protected]>

* typo fix: missing api in io.seldon.wrapper.api.SeldonPredictionService

* Create and use seldonio/core-builder:0.10

* fix operator build - controller-gen install for go modules

* make gpu image Python 3 exclusive, closes #1324

* version 1.0.1

* version 1.0.2-SNAPSHOT

* seldon-core python version 1.0.1

* python wrapper version usage updated

* update images reference doc

Co-authored-by: RafalSkolasinski <[email protected]>
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Adrian Gonzalez <[email protected]>
Co-authored-by: Ryan Dawson <[email protected]>
Co-authored-by: Gurminder Sunner <[email protected]>
@ford-mach1ml
Copy link
Author

Looks good to me. Thanks for taking care of this!

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

No branches or pull requests

3 participants