Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

ci: compress release image layers at the fastest gzip level (#1043)

Krisztian Gajdar32c210f9ef81
diff --git a/tools/ci/tests/test_docker_task.py b/tools/ci/tests/test_docker_task.py
index bdb388657..ad88ad93b 100644
--- a/tools/ci/tests/test_docker_task.py
+++ b/tools/ci/tests/test_docker_task.py
@@ -110,7 +110,8 @@ def test_build_commands_only_load_source_bound_images():
source_revision=FULL_SHA,
),
):
- assert "--load" in command
+ assert command[-3:] == ["--output", "type=docker,compression=gzip,compression-level=1", "."]
+ assert "--load" not in command
assert "--push" not in command
assert f"org.opencontainers.image.revision={FULL_SHA}" in command
assert "org.opencontainers.image.source=https://github.com/superlinked/sie" in command
diff --git a/tools/mise_tasks/docker_task.py b/tools/mise_tasks/docker_task.py
index 67519fef7..f8e8fbfba 100755
--- a/tools/mise_tasks/docker_task.py
+++ b/tools/mise_tasks/docker_task.py
@@ -27,6 +27,10 @@ DEFAULT_DOCKER_PLATFORM = "linux/amd64"
SOURCE_REVISION = re.compile(r"[0-9a-f]{40}")
VERSION = re.compile(r"[0-9]+\.[0-9]+\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?")
SERVER_RUST_SUFFIX = "cuda12-sm89"
+# Loads the image into Docker like --load. Docker stores layers uncompressed,
+# so gzip only shrinks the tarball in transit: the fastest level is enough.
+# Uncompressed layers do not fit the runner disk for the largest images.
+LOAD_IMAGE = ("--output", "type=docker,compression=gzip,compression-level=1")
SINGLETON_DOCKERFILES = {
"sie-gateway": ROOT / "packages/sie_gateway/Dockerfile",
"sie-config": ROOT / "packages/sie_config/Dockerfile",
@@ -218,7 +222,7 @@ def build_server_command(
"org.opencontainers.image.source=https://github.com/superlinked/sie",
"--tag",
server_image(registry, version, target),
- "--load",
+ *LOAD_IMAGE,
".",
]
return command
@@ -258,7 +262,7 @@ def build_service_command(
[
"--tag",
singleton_image(registry, version, service),
- "--load",
+ *LOAD_IMAGE,
".",
]
)