-
ContextHello Poetry Team, I'm part of an AI team within an enterprise setting, developing a Retrieval Augmented Generation (RAG) service using haystack-ai. We're troubleshooting an issue with our Docker build specifically related to dependency management using Poetry and RUN poetry install --no-root After the Docker image is built and the service is operational, we've noticed that some transitive dependencies of haystack-ai, like ModuleNotFoundError: No module named 'networkx' To mitigate this, I adjusted the Dockerfile to include a lock step before installation: RUN poetry lock --no-update && poetry install --no-root This change successfully resolves the dependency issue but adds approximately 400 seconds to our build time. Questions
Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
With an empty cache locking can take a while. Normally, you do not have to lock again if you already have a valid lock file.
Running I assume you are running into #9191 or similar. You have to update
Nothing official, but https://github.com/orgs/python-poetry/discussions/1879 might be interesting for you. |
Beta Was this translation helpful? Give feedback.
-
@radoering Awesome, this is helpful. Thanks for the quick reply and resources, much appreciated! |
Beta Was this translation helpful? Give feedback.
With an empty cache locking can take a while. Normally, you do not have to lock again if you already have a valid lock file.
Running
poetry lock --no-update
is not necessary if your lock file has been valid and you did not change pyproject.toml. If you have a valid lock file, you can just copy the pyproject.toml and …