Skip to content

[codex] fix compose backend runtime deps#61

Merged
rmkraus merged 2 commits into
stagingfrom
codex/fix-compose-backend-runtime-deps
Jul 7, 2026
Merged

[codex] fix compose backend runtime deps#61
rmkraus merged 2 commits into
stagingfrom
codex/fix-compose-backend-runtime-deps

Conversation

@rmkraus

@rmkraus rmkraus commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

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, and psycopg[binary].

Also makes version metadata safe for Docker images that intentionally exclude .git metadata by preferring injected VERSION, GIT_SHA, GIT_BRANCH, and BUILD_TIME values before trying git commands. Finally, fixes guardrails config path resolution so both legacy and SDK guardrails load data/config/guardrails from the repo/app root rather than src/data/....

Root Cause

Dockerfile.backend installs requirements.docker.txt, but that file had drifted behind requirements.txt and 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.txt
  • uv pip install --python /tmp/maiw-backend-runtime-deps-minlock-venv/bin/python -r requirements.txt -r requirements.docker.txt -c /tmp/maiw-requirements.constraints
  • uv pip check --python /tmp/maiw-backend-runtime-deps-minlock-venv/bin/python
  • Python 3.11 backend import check from /tmp with PYTHONPATH pointed at the repo, minimal DB env, and injected build metadata
  • python3 -m py_compile src/api/services/version.py src/api/services/guardrails/guardrails_service.py src/api/services/guardrails/nemo_sdk_service.py
  • POSTGRES_USER=test POSTGRES_PASSWORD=test POSTGRES_DB=test docker compose -f deploy/compose/docker-compose.dev.yaml config --services
  • git diff --check

Docker 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.

@rmkraus rmkraus changed the base branch from main to staging July 7, 2026 03:30
…backend-runtime-deps

# Conflicts:
#	requirements.docker.txt
@rmkraus rmkraus marked this pull request as ready for review July 7, 2026 03:42
@rmkraus rmkraus merged commit 35df9a8 into staging Jul 7, 2026
@rmkraus rmkraus deleted the codex/fix-compose-backend-runtime-deps branch July 7, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant