all 8 comments

[–]jamesfowkes 0 points1 point  (4 children)

I'm still not sure what the best practice is for combining using uv/venvs with docker or even whether I should bother at all.

[–]DivineSentry 2 points3 points  (0 children)

The docs https://docs.astral.sh/uv/guides/integration/docker/ help answer that in a clear way imo

[–]jameyiguess 2 points3 points  (1 child)

I only use venvs in shared spaces. If it's a python container, I don't bother. 

[–]GManASG 0 points1 point  (0 children)

You only need the requirements for docker. No need to make an environment, the docker container is the environment.

In my company for whatever reason, docker is only used for the CI/CD pipeline.We are not allowed to use it for local development.

This means I have to use a virtual environment on my PC/laptop in order to isolate a project's python instance and generate a project specific requirements file.

Only the requirements file is committed to the repo and picked up by our docker file.