-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
Problems
Currently, docker deployment is using wheel for installing libs and dependency. If the dependency is small and easy, the current workflow is still fine but using wheel rather than poetry.lock cause poetry deployment philosophy is useless. For ex:
- File poetry.lock keep the consistency hash URL of dependency that will prevent you from automatically getting the latest versions of your dependencies. Easier to cache and security concern
- Not using poetry as full potential and may come with bugs in installation for multiple VM specs. For ex: PyTorch has multiple installs method for different specs (CPU and GPU), I can easily specify package version require in poetry but can not do the same with wheel package.
Solution propose
I think the wheel package install is not the way to go for python-monorepo deployment and we can use docker buildkit that supports docker context outside of the package install. Ref
Here is my current way to build docker for Monorepo:
docker buildx build --build-context libs=../../libs .
Dockerfile
COPY --from=libs . ./../../libs
RUN poetry install # With share libs install: libcommon = {path = "../../libs/libcommon", develop = true}
Metadata
Metadata
Assignees
Labels
No labels