Title: perf(ci): build the app image on 16 vCPU, pin node-gyp, and keep the toolchain out of the runtime image by waleedlatif1 · Pull Request #6500 · simstudioai/sim · GitHub
Open Graph Title: perf(ci): build the app image on 16 vCPU, pin node-gyp, and keep the toolchain out of the runtime image by waleedlatif1 · Pull Request #6500 · simstudioai/sim
X Title: perf(ci): build the app image on 16 vCPU, pin node-gyp, and keep the toolchain out of the runtime image by waleedlatif1 · Pull Request #6500 · simstudioai/sim
Description: Summary Three independently-verified changes to the app image build. Each measured, none dependent on the others. 1. The app image builds on 16 vCPU instead of 8. Its two dominant steps — bun install (~300-465s) and next build (~262s) — both scale with cores, and this build gates every deploy because nothing ships until the image is pushed. The same next build already runs on 16 vCPU in the Build App verification job, which gates nothing. ARM64 stays at 8: that job is off the deploy path and the workflow warns an unprovisioned runner label hangs a release in queued. 2. node-gyp comes from the lockfile, not npx. npx node-gyp resolved from the registry during every production image build, which pulled 13.x over the pinned 12.4.0 and bypassed the minimumReleaseAge supply-chain gate in bunfig.toml. It has to be an apps/sim devDependency because the only other copy is transitive through @electron/rebuild, which turbo prune sim strips. 3. base splits into base + build-base. The 390 MB compiler toolchain (measured: 1.21 GB vs 1.6 GB) exists only to compile isolated-vm against Node. The runner copies the finished binary, so shipping the toolchain inflated every ECS task pull. ffmpeg and python3 stay — fluent-ffmpeg is a serverExternalPackage. Type of Change Improvement Testing Verified against real image builds, not by inspection: Check Result Full image build ✅ succeeds g++ / make / pip3 in runtime ✅ absent node / bun / python3 / ffmpeg ✅ present isolated-vm native module ✅ loads and evaluates (1+1 → 2) lib0 / yjs / y-protocols + lib0/logging.js ✅ intact (the collab-doc 500) sharp + libvips (compatibility with #6499) ✅ loads and encodes a PNG in the slimmed image Container boot ✅ Next.js Ready, no module errors Dependency hoisting ✅ root which@6.0.1, fluent-ffmpeg keeps its own 1.3.1 Full suite ✅ 21,250 passed, 0 failed Audits / type-check ✅ 22 audits, 23 workspaces Interaction with #6499 was checked explicitly, since that PR ships sharp/@img into the same runtime image this PR slims. libvips' shared-library dependencies (libstdc++.so.6, libgcc_s.so.1, libm.so.6, libz.so.1) come from the base image and nodejs, not from g++, and sharp was confirmed to load and encode against the slimmed image. No conflict. What this does NOT do It does not change time-to-live for a deploy. That is ~15 min (≈10 min build + ~40s pipeline + ~185s Install/AllowTraffic) and stays that way. A dead end, recorded so nobody repeats it This branch briefly carried a change adding cache-key to useblacksmith/setup-docker-builder, on the theory that the app's dependency layer re-runs every build (286s / 465s observed) because all five Dockerfiles shared one unkeyed layer cache. It was reverted — the input does not exist, at the pinned SHA or on main, and Actions silently ignores unknown inputs. The key is not configurable: // src/setup_builder.ts:409 const stickyDiskKey = process.env.GITHUB_REPO_NAME || ""; The real CI log also disproves the eviction theory — the disk is obtained successfully, with prior state, no fallback: Getting sticky disk for simstudioai/sim Sticky disk parent snapshot: commit-01KZP43K3QNJ04JYYGQS7H1MMG Successfully obtained sticky disk So the cache is present and the deps layer still re-runs. That cause remains unidentified and is not addressed here. Verified separately that the Dockerfile is not at fault: a local source-only change rebuilds with the deps layer CACHED, and turbo prune's out/json is byte-identical across runs. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary Three independently-verified changes to the app image build. Each measured, none dependent on the others. 1. The app image builds on 16 vCPU instead of 8. Its two dominant steps — bun insta...
X Description: Summary Three independently-verified changes to the app image build. Each measured, none dependent on the others. 1. The app image builds on 16 vCPU instead of 8. Its two dominant steps — bun insta...
Opengraph URL: https://github.com/simstudioai/sim/pull/6500
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d53665bb-6c44-9802-99e8-bb85192431f1 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A582:1EFDE9:6FA152:9A72CD:6AFB42E4 |
| html-safe-nonce | 7226712d78e3e842a0dd3e269283b551794f550f6d0315dc97d5591a43f3dac0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTgyOjFFRkRFOTo2RkExNTI6OUE3MkNEOjZBRkI0MkU0IiwidmlzaXRvcl9pZCI6IjQyNTgxMDM4MDM5NDY2ODEwNjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | db6899d68d0d367b468ecd7ece20df6c419ccbb8b820c99dbff28474372a3978 |
| hovercard-subject-tag | pull_request:4247566039 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/6500/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Three independently-verified changes to the app image build. Each measured, none dependent on the others. 1. The app image builds on 16 vCPU instead of 8. Its two dominant steps — bun insta... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a6c2f87cbcb6414452377b4967858ed6a66f1109 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width