ML-025 — Container Runtime Configuration

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, python

Research direction

Start by locating the existing Pydantic Settings usage and the serving container configuration. Verify the listed MLflow, model, host, and port environment variables override defaults, including numeric port parsing, and check how Docker receives .env files without baking in secrets. Done means one image runs with different runtime values, invalid settings fail clearly, configuration tests and documentation are updated, and MyPy and Ruff pass.

Written by the indexing model from the issue text.

Description

ML-025 — Container Runtime Configuration

Goal

Configure the serving container at runtime using environment variables so that the same Docker image can be used across different environments without rebuilding it.

Background

The serving layer already uses the platform's Pydantic Settings configuration.

Containerization should preserve this architecture by injecting environment-specific values at runtime rather than embedding configuration into the Docker image.

Requirements

The container must support external configuration for:

  • MLflow tracking URI.
  • MLflow registry URI.
  • Serving model name.
  • Serving model alias.
  • Serving host.
  • Serving port.
  • Platform environment where applicable.

Existing application defaults should remain available when values are not explicitly provided.

Tasks

  • Verify containerized application loads the existing Settings.
  • Support MLFLOW_TRACKING_URI.
  • Support MLFLOW_REGISTRY_URI.
  • Support SERVING_MODEL_NAME.
  • Support SERVING_MODEL_ALIAS.
  • Support SERVING_HOST.
  • Support SERVING_PORT.
  • Verify environment variables override application defaults.
  • Verify numeric environment values such as SERVING_PORT are parsed correctly.
  • Ensure environment-specific values are not hardcoded into the Docker image.
  • Ensure secrets are not copied into the image.
  • Document how .env files can be supplied to Docker.
  • Verify MLflow endpoints can be changed without rebuilding the image.

Acceptance Criteria

  • A single Docker image can run with different runtime configurations.
  • Environment variables override default settings.
  • Model name and alias can be changed without rebuilding.
  • MLflow tracking and registry URIs can be changed without rebuilding.
  • Host and port configuration is externalized.
  • Invalid configuration produces a clear application startup/configuration error.
  • No secrets are baked into the image.

Example

The container should support configuration similar to:

docker run --rm \
  -p 8000:8000 \
  -e MLFLOW_TRACKING_URI=http://mlflow:5000 \
  -e MLFLOW_REGISTRY_URI=http://mlflow:5000 \
  -e SERVING_MODEL_NAME=f1-predictor \
  -e SERVING_MODEL_ALIAS=champion \
  -e SERVING_HOST=0.0.0.0 \
  -e SERVING_PORT=8000 \
  ml-platform

Definition of Done

  • Runtime configuration verified.
  • No environment-specific configuration baked into image.
  • Configuration tests pass.
  • Container starts using environment overrides.
  • Documentation updated.
  • MyPy passes.
  • Ruff passes.
Dominant language
Python
Stars
1
Forks
0
Avg merge
7m
Merged PRs (30d)
3

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Emil57/ml-platform

All issues in Emil57/ml-platform

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.