Skip to content

Commit 0ea2c38

Browse files
committed
ci: speed up the docker build
1 parent 8779626 commit 0ea2c38

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Install uv and set Python to ${{ matrix.python-version }}
21-
uses: astral-sh/setup-uv@v5
21+
uses: astral-sh/setup-uv@v6
2222
with:
23-
version: "0.6.10"
23+
version: "0.7.20"
2424
python-version: ${{ matrix.python-version }}
2525
- name: Install dependencies
2626
run: |

docker/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,16 @@ RUN addgroup --gid $CMS_GID cms || true && \
2323

2424
COPY app /app
2525
COPY pyproject.toml /pyproject.toml
26+
COPY uv.lock /uv.lock
2627
COPY docker/entrypoint/serve.sh /app/entrypoint.sh
2728
RUN mkdir -p /app/model/model && \
2829
mkdir -p /app/model/retrained && \
2930
chown -R $CMS_UID:$CMS_GID /app
30-
RUN pip install --no-cache-dir -U pip && \
31-
pip install --no-cache-dir -e . && \
31+
RUN pip install --no-cache-dir uv==0.7.20 && \
32+
uv sync --locked && \
3233
chmod +x /app/entrypoint.sh
3334

3435
WORKDIR /app
3536
EXPOSE 8000
3637
USER cms:cms
37-
CMD ["/app/entrypoint.sh"]
38+
CMD ["uv", "run", "/app/entrypoint.sh"]

0 commit comments

Comments
 (0)