glciampaglia / osome-csdl-ranking-challenge

Testing ranking algorithms to improve social cohesion
0 stars 0 forks source link

Separate dev / build / test dependencies in separate groups #7

Open glciampaglia opened 1 week ago

glciampaglia commented 1 week ago

The original reason for this task was to reduce the size of the docker images for the various components (ranker, scorer worker, sandboxed worker, etc.). However after rewriting up the build script to make a correct use of the docker build cache properly when installing packages with poetry (following this recommended approach), now this is not a problem anymore since we can build all containers from the same image, and all image reuse the same dependency layer.

That said it would be still a good idea to separate build and test dependencies in separate groups. (We already have a dev group and so far there is only IPython.)

Original task:

See poetry's dependency groups. Once this is done update the poetry install line in each docker build file to use only the respective group. This should cut down on the image size.

glciampaglia commented 1 week ago

It looks like we can use the same docker file, so there is no pressing need anymore to split the dependencies on a per-image basis. That said, it would be still good to use groups. Here is a running list of dependencies and their ideal group: