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

pip install when building a docker image takes too long #24

Open
id5h opened this issue Jun 27, 2023 · 5 comments
Open

pip install when building a docker image takes too long #24

id5h opened this issue Jun 27, 2023 · 5 comments

Comments

@id5h
Copy link

id5h commented Jun 27, 2023

Hi, I need to install lttbc when building a python docker image, based on python:3.11.4-slim-bookworm.

The command in the Dockerfile is:
RUN pip3 install --no-cache-dir numpy==1.24.4 lttbc==0.2.4

However, it takes more than 10 minutes to finish installing the build dependencies
(I get the message Installing build dependencies: still running...).
I do not see any dependencies for lttbc in the Readme.

For completeness, I also RUN apt-get install -y build-essential libblas-dev gcc before running the pip install stage.
I am on an M1-pro and building the image with the flag --platform linux/amd64.

Any ideas what might cause this problem?

@dgoeries
Copy link
Owner

I believe it will try to install numpy version 1.22 for the build process. This problem occured when switching to the toml structure. Putting a build dependency specification with numpy>=1.22 was always taking the highest available, e.g. 1.24. This did result in compatibility problems.

I could provide another lttbc with a different toml to circumvent this

@dgoeries
Copy link
Owner

E.g. use 1.24 for the build process

@id5h
Copy link
Author

id5h commented Jun 27, 2023

Thanks for the prompt reply @dgoeries !

I am running now with RUN pip3 install --no-cache-dir numpy==1.22 lttbc==0.2.4, but see no difference

@id5h
Copy link
Author

id5h commented Jun 27, 2023

Same with RUN pip3 install --no-cache-dir numpy==1.24 lttbc==0.2.4.

Did I misunderstand your suggestion?

@dgoeries
Copy link
Owner

Yes, it will still try to install numpy=1.22 for the build process :(. I need to prepare a new version and document

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

2 participants