Skip to content

Commit 7944d8a

Browse files
committed
Migrate from poetry to uv
1 parent 6e41275 commit 7944d8a

5 files changed

Lines changed: 495 additions & 649 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ lib
33
lib64
44
share
55
pyvenv.cfg
6-
__pycache__
6+
__pycache__
7+
.vscode

Dockerfile

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,14 @@ FROM python:3.10
44
WORKDIR /playground
55
RUN useradd -m iac
66

7-
ENV PATH="/root/.local/bin:$PATH" \
8-
PYTHONDONTWRITEBYTECODE=1 \
9-
PYTHONUNBUFFERED=1
10-
11-
12-
RUN apt-get update && apt-get install curl -y \
13-
&& rm -rf /var/lib/apt/lists/* \
14-
&& curl -sSL https://install.python-poetry.org | python3 \
15-
&& poetry config virtualenvs.create false
7+
# Install uv.
8+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
169

1710
COPY --chown=iac:iac pyproject.toml .
18-
COPY --chown=iac:iac poetry.lock .
11+
COPY --chown=iac:iac uv.lock .
1912

20-
# poetry does not support subdirectory yet
21-
RUN poetry install --no-dev --no-interaction --no-ansi
13+
ENV UV_PROJECT_ENVIRONMENT=/usr/local
14+
RUN uv sync --frozen --no-cache --no-dev
2215

2316
COPY --chown=iac:iac . .
2417

0 commit comments

Comments
 (0)