Package locking is crazy slow for scikit-learn
See original GitHub issueI’m sorry I don’t have a reduced test case for this but this is so crazy slow it’s hard to actually debug.
Steps to reproduce
- Clone https://github.com/HearthSim/hearthsim-vagrant
- Inside that directory, clone https://github.com/HearthSim/HSReplay.net
- Run
docker-compose build django
(this builds an image based on the python-stretch docker image, which will also install the latest pipenv systemwide, cf. Dockerfile). - Finally, run
docker-compose run django
, which runspipenv install --dev
On linux, this stays stuck at Locking [packages]
for over 15 minutes, with no output even when run with --verbose
. Then after ~15 mins, it gives me the full output of what it’s been doing for all that time.
When run outside of docker, it still takes a couple of minutes on that step, but at most 1-2 mins. I have a pretty beefy CPU and SSD, so I don’t know why it would take this long in the first place.
I also see a lot of Warning: Error generating hash for ...
in the verbose output, I don’t know if that’s related.
Any idea? How can I debug this further?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:10
- Comments:43 (35 by maintainers)
Top Results From Across the Web
Developers - Package locking is crazy slow for scikit-learn -
Run docker-compose build django (this builds an image based on the python-stretch docker image, which will also install the latest pipenv systemwide, cf....
Read more >Install scikit-learn for python3 very slow - Stack Overflow
I am trying to install scikit-learn to be used in python3 on Jetson xaiver with ubuntu. When I ran: sudo pip3 install scikit-lear....
Read more >Are your Python programs running slow? Here's how you can ...
We all know that Python is much slower than statically-typed programming languages like C, C++, Java and some dynamic languages too like ...
Read more >Intel Extension for Scikit-Learn - Hacker News
The lock-in is an important consideration, but if the scikit-learn API is fully respected it would seem less relevant.
Read more >If Python is really slow, why are there many companies that ...
Specifically, Python is the gateway to one of the largest ecosystems of machine learning frameworks and distributed compute platforms. These systems are ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
you shouldn’t be running lock in docker in the first place…
😃
I fully understand what pipenv brings to the table. Just to explain why I’m using it in docker:
With that said, I’m not interested in solving my problem. I solved my problem by adding --skip-lock. I’m interested in solving, or helping solve, the egregious difference in performance between inside and outside of the container. Or at least coming out of this with a “there’s a very good reason for this difference and here it is”.
But yarn is also running inside that same container and managing 1-2 orders of magnitude more dependencies than pipenv, so I think we can do better. And if that takes me PRing setup.py/setup.cfg fixes to 30 different projects so be it 😃