Add docker-compose.local.yml for native arm64 dev builds#874
Open
paynejd wants to merge 1 commit into
Open
Conversation
…ive arm64 dev builds The published openconceptlab/oclapi2 images are amd64-only. On Apple Silicon and other arm64 hosts they run under Rosetta/QEMU emulation, and Celery's post-restart indexing saturates emulated cores hard enough to block the API for tens of seconds. Adds an opt-in compose override (mirroring the existing docker-compose.sso.yml pattern) that attaches build: . to the api service so the image gets compiled from the local Dockerfile against the host architecture. The other 8 services that share the same image tag pick up the locally-built image automatically. Measured on M4 MacBook + OrbStack: GET /orgs/ 10s timeout to ~20ms, POST /concepts/ 60s timeout to ~280ms. Production / CI behavior unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
docker-compose.local.ymlthat addsbuild: .to theapiservice so arm64 dev hosts (Apple Silicon, arm64 Linux) compile the image locally frompython:3.12-sliminstead of running the amd64 published image under Rosetta/QEMUdocker-compose.ymluntouched)Why
Closes OpenConceptLab/ocl_issues#2538. The published
openconceptlab/oclapi2:productionis amd64-only. On Apple Silicon under OrbStack / Docker Desktop, post-restart Celery indexing saturates emulated cores hard enough to block the API for 10–60s on most requests.Measured on an M4 MacBook (24 GB):
GET /orgs/POST /concepts/Discovered while standing up a local oclapi2 + FHIRsmith demo — without this fix the stack was effectively unusable on Apple Silicon.
Design notes
build:only on theapiservice; the other 8 services that share theopenconceptlab/oclapi2:${ENVIRONMENT-production}image tag pick up the locally-tagged image automatically.docker-compose.sso.yml(invoked via-f) rather than re-introducingdocker-compose.override.yml(which the repo previously took out of auto-load, now.bak).docker compose -f docker-compose.yml -f docker-compose.local.yml build api(also called out in the README).Test plan
docker compose -f docker-compose.yml -f docker-compose.local.yml configparses cleanly;apishows the mergedbuild:blockdocker compose -f docker-compose.yml -f docker-compose.local.yml up -don M4 builds image asarm64/linux(verified withdocker image inspect)Longer-term suggestion
Publishing multi-arch images via
docker buildx --platform linux/amd64,linux/arm64in CI would remove the need for this override entirely. Worth a separate ticket.🤖 Generated with Claude Code