File tree 1 file changed +10
-9
lines changed
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
- FROM rust:1.80 -alpine3.20 AS accents_builder
1
+ FROM rust:1.82 -alpine3.20 AS accents_builder
2
2
3
3
WORKDIR /build
4
4
@@ -11,21 +11,22 @@ RUN : \
11
11
FROM python:3.12-alpine3.20
12
12
13
13
ENV PYTHONUNBUFFERED=yes \
14
- PYTHONDONTWRITEBYTECODE=yes
14
+ PYTHONDONTWRITEBYTECODE=yes \
15
+ UV_LINK_MODE=copy
15
16
16
17
WORKDIR /code
17
18
18
- COPY --from=ghcr.io/astral-sh/uv:0.4.0 /uv /bin/uv
19
- COPY uv.lock pyproject.toml .
20
-
21
- RUN --mount=type=cache, target=/root/.cache/uv : \
22
- && apk add --no-cache \
19
+ RUN --mount= from=ghcr.io/astral-sh/uv:0.4.24,source= /uv,target= /bin/uv \
20
+ --mount=type=cache,target=/root/.cache/uv \
21
+ --mount=type=bind,source=uv.lock,target=uv.lock \
22
+ --mount=type=bind,source=pyproject.toml, target=pyproject.toml \
23
+ apk add --no-cache \
23
24
# gif optimizer
24
25
gifsicle \
25
26
# Font for trocr
26
27
ttf-dejavu \
27
- && uv sync --frozen --no-dev --link-mode=copy \
28
- && rm /bin/ uv pyproject.toml uv.lock
28
+ # export requirements from uv.lock since uv does not support sync withour venv
29
+ && uv export --frozen --format requirements-txt --no-dev --quiet | uv pip install --system -r -
29
30
30
31
COPY --from=accents_builder /build/target/release/sayit /usr/bin/sayit
31
32
You can’t perform that action at this time.
0 commit comments