Skip to content

Commit

Permalink
fix: from rye to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
a5chin committed Aug 26, 2024
1 parent c902f7d commit ad21e66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ FROM python:${VARIANT} AS builder
ENV PYTHONDONTWRITEBYTECODE=True

WORKDIR /opt
COPY pyproject.toml requirements.lock ./
COPY pyproject.toml ./

# hadolint ignore=DL3013,DL3042
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.lock
pip install uv && \
uv pip compile pyproject.toml -o requirements.txt && \
pip install --no-cache-dir -r requirements.txt


FROM python:${VARIANT}-slim
COPY --from=builder /usr/local/lib/python*/site-packages /usr/local/lib/python*/site-packages

ENV PYTHONUNBUFFERED=True

WORKDIR /
WORKDIR $HOME

Check warning on line 21 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Variables should be defined before their use

UndefinedVar: Usage of undefined variable '$HOME' More info: https://docs.docker.com/go/dockerfile/rule/undefined-var/

Check warning on line 21 in Dockerfile

View workflow job for this annotation

GitHub Actions / build

Relative workdir without an absolute workdir declared within the build can have unexpected results if the base image changes

WorkdirRelativePath: Relative workdir "" can have unexpected results if the base image changes More info: https://docs.docker.com/go/dockerfile/rule/workdir-relative-path/
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ authors = [
]
dependencies = []
readme = "README.md"
requires-python = ">= 3.12"
requires-python = ">=3.9"

[tool.rye]
managed = true
[tool.uv]
dev-dependencies = [
"pytest>=8.3.2",
"pre-commit>=3.8.0",
"ruff>=0.5.5",
"ruff>=0.6.2",
]

0 comments on commit ad21e66

Please sign in to comment.