Skip to content

Commit a33540a

Browse files
committed
perf: replace installdependencies.sh with explicit apt_install
installdependencies.sh is a shell script that runs apt-get update and installs 5-6 .NET runtime dependencies. On Ubuntu 22.04 these libraries are pre-installed (libkrb5-3, zlib1g, libssl3) or trivially available (liblttng-ust1, libicu71), making the script almost a no-op — but the apt-get update + fallback chain still adds 15-60s of overhead. Pin the exact packages directly in the image layer via apt_install. The image gets a clean dep declaration and removes the cold-start bottleneck. Per the actions/runner source, the runner's .NET runtime links against these libraries at execution time; they're identical to what installdependencies.sh would have installed.
1 parent ac4b0bb commit a33540a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

runner/services/sandbox_service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,14 @@ def build_runner_image() -> modal.Image:
9797
)
9898
# Layer 2: Python deps (semi-stable)
9999
.apt_install("python3", "python3-pip", "python-is-python3")
100+
# Runner native deps (replaces installdependencies.sh which is a no-op
101+
# on Ubuntu 22.04 but adds 15-60s of apt-get update overhead)
102+
.apt_install("libkrb5-3", "zlib1g", "liblttng-ust1", "libssl3", "libicu71")
100103
.pip_install("fastapi==0.115.0", "httpx==0.27.0")
101104
# Layer 3: Runner binary (changes with RUNNER_VERSION)
102105
.run_commands(
103106
"mkdir -p /actions-runner",
104107
f"curl -L https://github.com/actions/runner/releases/download/v{RUNNER_VERSION}/actions-runner-linux-x64-{RUNNER_VERSION}.tar.gz | tar -xz -C /actions-runner", # noqa: E501
105-
"/actions-runner/bin/installdependencies.sh",
106108
)
107109
)
108110

0 commit comments

Comments
 (0)