Skip to content

Commit 3735103

Browse files
committed
Store RUN --mount=type=cache in Github cache
1 parent 505304b commit 3735103

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

.github/workflows/scheduler_docker_image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ jobs:
9292
{
9393
"docker-cache-uv": "/root/.cache/uv"
9494
}
95+
skip-extraction: ${{ steps.cache-primes.outputs.cache-hit }}
9596

9697
- name: Build scheduler image
9798
uses: docker/build-push-action@v6

.github/workflows/server_docker_image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ jobs:
8787
{
8888
"docker-cache-uv": "/root/.cache/uv"
8989
}
90+
skip-extraction: ${{ steps.cache-primes.outputs.cache-hit }}
9091

9192
- name: Build Server image
9293
uses: docker/build-push-action@v6

.github/workflows/worker_docker_image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ jobs:
9595
"docker-cache-uv": "/root/.cache/uv",
9696
"docker-cache-ivy2": "/root/.ivy2"
9797
}
98+
skip-extraction: ${{ steps.cache-primes.outputs.cache-hit }}
9899

99100
- name: Build worker image
100101
uses: docker/build-push-action@v6

docker/Dockerfile.scheduler

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ COPY ./pyproject.toml ./uv.lock /app/
2020
RUN --mount=type=cache,target=/root/.cache/uv \
2121
uv sync \
2222
--frozen \
23-
--no-install-project \
2423
--link-mode copy \
24+
--no-install-project \
2525
# TODO: make scheduler independent from server
2626
--extra "server" \
2727
--extra "scheduler" \
@@ -47,8 +47,8 @@ FROM builder AS test
4747
RUN --mount=type=cache,target=/root/.cache/uv \
4848
uv sync \
4949
--frozen \
50-
--no-install-project \
5150
--link-mode copy \
51+
--no-install-project \
5252
--extra "server" \
5353
--extra "scheduler" \
5454
--group "test" \

docker/Dockerfile.server

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ COPY ./pyproject.toml ./uv.lock /app/
2626
RUN --mount=type=cache,target=/root/.cache/uv \
2727
uv sync \
2828
--frozen \
29-
--no-install-project \
3029
--link-mode copy \
30+
--no-install-project \
3131
--extra "server" \
3232
--compile-bytecode
3333

@@ -68,8 +68,8 @@ FROM builder AS test
6868
RUN --mount=type=cache,target=/root/.cache/uv \
6969
uv sync \
7070
--frozen \
71-
--no-install-project \
7271
--link-mode copy \
72+
--no-install-project \
7373
--extra "server" \
7474
--group "test" \
7575
--compile-bytecode

docker/Dockerfile.worker

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
ARG PYTHON_VERSION=3.13
44
FROM python:$PYTHON_VERSION-slim-bookworm AS base
55

6-
RUN apt-get update && apt-get install -y --no-install-recommends \
6+
RUN apt-get update && \
7+
apt-get install -y --no-install-recommends \
78
tini \
89
openjdk-17-jdk-headless \
910
# required for HDFS/Hive with Kerberos enabled
@@ -22,7 +23,8 @@ ENV PYTHONPATH=/app \
2223

2324
FROM base AS builder
2425

25-
RUN apt-get update && apt-get install -y --no-install-recommends \
26+
RUN apt-get update && \
27+
apt-get install -y --no-install-recommends \
2628
autoconf \
2729
gcc \
2830
make \
@@ -47,7 +49,8 @@ RUN --mount=type=cache,target=/root/.cache/uv \
4749
# The same list of packages should produce the same file content & metadata (modification times, ownership)
4850
FROM builder AS ivy2_packages
4951

50-
RUN apt-get update && apt-get install -y --no-install-recommends \
52+
RUN apt-get update && \
53+
apt-get install -y --no-install-recommends \
5154
rsync \
5255
&& rm -rf /var/lib/apt/lists/* /var/cache/*
5356

0 commit comments

Comments
 (0)