augur icon indicating copy to clipboard operation
augur copied to clipboard

Docker compose builds pip 6 times

Open cdolfi opened this issue 9 months ago • 4 comments

In the docker compose pip is built 6 times, is this necessary? https://github.com/chaoss/augur/blob/main/docker/backend/Dockerfile#L105-119

cdolfi avatar Mar 10 '25 16:03 cdolfi

i doubt it is necessary - if it was i suspect there would be a comment explaining why its necessary

you could at least get it down by ~ half by removing either the RUN call that does them all in one step, or the three that splits it out separately

I personally would probably also try and remove the venv things and just install directly, because at that point youre running an isolated virtual environment (designed to help keep things separated on a host that has multiple programs with possibly conflicting dependencies) into a container (which is seemingly used as a single-purpose environment just for augur)

while not directly related, i figure id also add #3006 as a reference since i probably would have mentioned this if i had noticed it while filing that issue/PR

MoralCode avatar Mar 10 '25 20:03 MoralCode

That makes senes. In the docker clean up process cutting this down a bit might be a good idea

cdolfi avatar Mar 11 '25 14:03 cdolfi

I am of course a little skittish about changing anything related to Docker. @MoralCode : Do you think this is ready to be merged, or should we ask @GregSutcliffe ?

sgoggins avatar Mar 18 '25 14:03 sgoggins

Do you think this is ready to be merged

this is an issue. Is there a related pull request?

I think it is relatively safe to remove the obvious duplication in the dockerfile, but i can test this alongside my fixes for #3053 too if that helps

MoralCode avatar Mar 18 '25 15:03 MoralCode

backend dockerfile no longer mentions pip, uses uv instead

MoralCode avatar Jul 17 '25 15:07 MoralCode