Closed bschoenmaeckers closed 6 months ago
We had this during development but turned it off on launch — to be revisited.
Can you share more about your use-case for the image?
I would like to use it in a slim docker image like shown below, this way docker will cache the latest uv binary but does not include it into the final image.
FROM ghcr.io/astral-sh/uv as uv
FROM python:alpine
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=from=uv,source=/uv,target=./uv \
./uv pip install .....
Yeah, much easier and efficient installation method when working with containers!
I'm currently doing a pip install
and pulling that binary in multi-stage, just to avoid installing curl for the install script. That mostly just tries to figure the current OS and arch, but with a multi-platformat container images that's handled automatically already. Also, pulling from uv and python base image can be done in parallel here, while doing the install in a RUN doesn't.
cc @charliermarsh who has more context on how hard it would be to enable this again
It would also be nice to have an image with the latest python for building wheels in the CI.
uv pip install build[uv] twine
python -m build --installer uv
python -m twine upload dist/*
You can use multi stage to copy uv into any image. That'll keep the uv image as small as possible for faster download.
It's great that this is in 🙌
Can you tag the image with the release version though? That would help with pinning.
We will, there was just a permissions issue in the last release #3195
There is a Dockerfile available in the repo but it is not (yet) published to the package registry.