lttbc icon indicating copy to clipboard operation
lttbc copied to clipboard

pip install when building a docker image takes too long

Open id5h opened this issue 2 years ago • 5 comments

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?

id5h avatar Jun 27 '23 22:06 id5h

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 avatar Jun 27 '23 22:06 dgoeries

E.g. use 1.24 for the build process

dgoeries avatar Jun 27 '23 22:06 dgoeries

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 avatar Jun 27 '23 22:06 id5h

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

Did I misunderstand your suggestion?

id5h avatar Jun 27 '23 22:06 id5h

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

dgoeries avatar Jun 27 '23 22:06 dgoeries