-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Pkg_resources is not defined in python docker #10265
Comments
A pickled object is tied to the environment that produces it, including Python versions (you can run into invalid Python byte code when loading a Python object from a different Python version), XGBoost versions, and potentially all the dependencies that are loaded into the environment. It's basically a raw serialization. Use |
Hello @trivialfis Thanks for commenting. I instructed my team to read this and they have sent me the updated implementation. Now, at the beginning of our python script, we have
and already that is throwing an error:
Is there any documentation which lists requirements for running XGBoost inside a docker container? |
Thank you for the update. I looked again, it appears to be an issue with |
Updating to 1.7.1 solved the problem. I spent days trying to resolve this, thank you! |
Hi all,
for some time now, I am maintaining a service developed as a python app by my colleagues. I have a docker image that’s been working perfectly until recently when they introduced the dependency on XGBoost. Since then, we are getting an exception in the python script with an error: “pkg_resources is not defined”. Here is the relevant dockerfile content:
And here is my requirements file:
During the attempts to fix it I also got error “ImportError: libexpat.so.1: cannot open shared object file: No such file or directory”
The line where it crashes:
nw = pickle.load(open( model_file, ‘rb’))
I’ve tried installing different additional packages, replicating their local development environments, adding C++ redistributable packages (saw it in XGBoost documentation) and no luck.
Any idea what is my docker image missing?
The text was updated successfully, but these errors were encountered: