astral-sh / uv

An extremely fast Python package and project manager, written in Rust.
https://docs.astral.sh/uv
Apache License 2.0
27.41k stars 791 forks source link

Request: Official uv devcontainer #8737

Open rdong8 opened 3 weeks ago

rdong8 commented 3 weeks ago

Would be really cool if we could get an official uv devcontainer for remote development using common IDEs (VS Code, PyCharm). It isn't too difficult to install uv in the Dockerfile by hand but an official option would be great. Currently the Python devcontainers are published version-by-version, so we don't have access to 3.13 yet.

wstrausser commented 3 weeks ago

Agreed that this would be great to have. For now, I've just been using the following Dockerfile for uv-based devcontainers:

FROM mcr.microsoft.com/devcontainers/base:bullseye

USER vscode
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ryanhiebert commented 2 weeks ago

If you want to avoid a custom dockerfile, you might be able to use this feature from the devcontainer.json. It's been working pretty well for me.

{
    "features": {
        "ghcr.io/va-h/devcontainers-features/uv:1": {}
    }
}