[codex] fix compose backend runtime deps#61
Merged
Conversation
…backend-runtime-deps # Conflicts: # requirements.docker.txt
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
Fixes the compose backend runtime dependency set so the Docker backend install path includes the packages used by backend startup and guardrails code, including
tiktoken,nemoguardrails, andpsycopg[binary].Also makes version metadata safe for Docker images that intentionally exclude
.gitmetadata by preferring injectedVERSION,GIT_SHA,GIT_BRANCH, andBUILD_TIMEvalues before trying git commands. Finally, fixes guardrails config path resolution so both legacy and SDK guardrails loaddata/config/guardrailsfrom the repo/app root rather thansrc/data/....Root Cause
Dockerfile.backendinstallsrequirements.docker.txt, but that file had drifted behindrequirements.txtand did not include runtime packages now imported by backend services. The backend image also excludes.git, while the version service tried git commands first.Validation
uv pip install --python /tmp/maiw-backend-runtime-deps-venv/bin/python -r requirements.docker.txtuv pip install --python /tmp/maiw-backend-runtime-deps-minlock-venv/bin/python -r requirements.txt -r requirements.docker.txt -c /tmp/maiw-requirements.constraintsuv pip check --python /tmp/maiw-backend-runtime-deps-minlock-venv/bin/python/tmpwithPYTHONPATHpointed at the repo, minimal DB env, and injected build metadatapython3 -m py_compile src/api/services/version.py src/api/services/guardrails/guardrails_service.py src/api/services/guardrails/nemo_sdk_service.pyPOSTGRES_USER=test POSTGRES_PASSWORD=test POSTGRES_DB=test docker compose -f deploy/compose/docker-compose.dev.yaml config --servicesgit diff --checkDocker image build was attempted, but local Docker daemon was not running:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.Refs: NVBug 6088205 / MAIW tracker item 7.