Migrate from Poetry to uv package manager

Co-authored-by: nikdoof <170514+nikdoof@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-07-16 22:59:26 +00:00
parent daa322b406
commit e9ae65bd21
6 changed files with 510 additions and 683 deletions

View File

@@ -7,23 +7,19 @@ ENV PYTHONFAULTHANDLER=1 \
PYTHONHASHSEED=random \
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
PATH="$PATH:/runtime/bin" \
PYTHONPATH="$PYTHONPATH:/runtime/lib/python3.12/site-packages" \
# Versions:
POETRY_VERSION=2.1.1
PIP_DEFAULT_TIMEOUT=100
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
# System deps:
RUN apk add build-base unzip wget python3-dev libffi-dev rust cargo openssl-dev
RUN pip install "poetry==$POETRY_VERSION" "poetry-plugin-export"
WORKDIR /src
# Generate requirements and install *all* dependencies.
COPY pyproject.toml poetry.lock /src/
RUN poetry export --without-hashes --no-interaction --no-ansi -f requirements.txt -o requirements.txt
COPY pyproject.toml uv.lock /src/
RUN uv export --format requirements-txt --output-file requirements.txt
RUN pip install --prefix=/runtime --force-reinstall -r requirements.txt
FROM base AS runtime