Skip to content

Commit 92d3399

Browse files
committed
Update Dockerfile to use UV and Python3.13
1 parent e13fa6e commit 92d3399

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

.devcontainer/Dockerfile

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,27 @@ FROM mcr.microsoft.com/devcontainers/python:1-${PYTHON_VERSION}-${LINUX_DISTRO}
55

66
# Install git for nox pre-commit
77
RUN apt-get update \
8-
&& apt-get install -y --no-install-recommends \
9-
git \
8+
&& apt-get install -y --no-install-recommends \
9+
git \
1010
&& rm -rf /var/lib/apt/lists/*
1111

12-
# Poetry
13-
ARG POETRY_VERSION="2.1.2"
14-
RUN if [ "${POETRY_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install poetry==${POETRY_VERSION}"; fi
12+
# Install UV dependency manager
13+
ARG UV_VERSION="0.6.11"
14+
RUN if [ "${UV_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install uv==${UV_VERSION}"; fi
1515

16-
# Nox
16+
# Nox installation using UV (system-level, so we pass --system)
1717
ARG NOX_VERSION="2025.2.9"
18-
RUN if [ "${NOX_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install nox-poetry nox==${NOX_VERSION}"; fi
18+
RUN if [ "${NOX_VERSION}" != "none" ]; then bash -c "umask 0002 && uv pip install --system nox==${NOX_VERSION}"; fi
1919

20-
# Nox poetry
21-
ARG NOX_POETRY_VERSION="1.2.0"
22-
RUN if [ "${NOX_POETRY_VERSION}" != "none" ]; then bash -c "umask 0002 && pip3 install nox-poetry nox-poetry==${NOX_POETRY_VERSION}"; fi
20+
# Extra python packages for dev (global/system-level)
21+
RUN bash -c "umask 0002 && uv pip install --system msgpack ipykernel"
2322

24-
# Extra python packages for dev
25-
RUN bash -c "umask 0002 && pip3 install msgpack ipykernel"
26-
27-
# Create venv
23+
# Create virtual environment
2824
RUN python -m venv /opt/venv
29-
RUN poetry config virtualenvs.create false
3025
ENV PATH="/opt/venv/bin:$PATH"
3126

32-
# Extra python packages for dev
33-
RUN bash -c "umask 0002 && pip3 install msgpack ipykernel"
27+
# Extra python packages for dev (inside the venv)
28+
RUN bash -c "umask 0002 && uv pip install msgpack ipykernel"
3429

3530
# Allow users to update venv
3631
RUN chmod -R 777 /opt/venv

0 commit comments

Comments
 (0)