ML-024 — Dockerize ML Serving API
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Domain
- api, devops, machine-learning
Research direction
Start by locating the existing FastAPI serving application and its /health endpoint, then review the dependency metadata and current test, MyPy, and Ruff commands. Add the Dockerfile and .dockerignore, build with docker build -t ml-platform ., and run it with the documented port mapping. Done means the image builds, the service starts, /health responds successfully, and existing checks pass.
Written by the indexing model from the issue text.
Description
ML-024 — Dockerize ML Serving API
Goal
Package the ML Platform serving API into a Docker image so that the inference service can run consistently across local and deployment environments.
Background
The ML Platform already exposes a FastAPI-based serving layer. The next step is to package the application and its runtime dependencies into a container.
Containerization should provide a reproducible runtime and establish the foundation for future CI/CD and cloud deployment.
Requirements
The container must:
- Use Python 3.12.
- Install project dependencies using
uv. - Include the ML Platform application source.
- Start the FastAPI serving application.
- Listen on the configured serving host and port.
- Expose the API port to the container runtime.
- Support the existing
/healthendpoint. - Run without requiring manual configuration inside the container.
Tasks
- Add a
Dockerfileto the repository. - Select an appropriate Python 3.12 base image.
- Install
uvin the build environment. - Copy dependency metadata before application source to support Docker layer caching.
- Install application runtime dependencies.
- Copy the ML Platform source into the image.
- Configure the container working directory.
- Define the command used to start the FastAPI application.
- Expose the serving port.
- Add a
.dockerignore. - Build the image locally.
- Run the image locally.
- Verify the
/healthendpoint from outside the container.
Acceptance Criteria
-
docker buildcompletes successfully. - The resulting image starts successfully.
- The FastAPI application is reachable from the host.
-
GET /healthreturns a successful response. - The container does not depend on developer-specific absolute paths.
- Application dependencies are installed reproducibly.
- Existing serving functionality remains unchanged.
Verification
The image should support a workflow similar to:
docker build -t ml-platform .
docker run --rm -p 8000:8000 ml-platform
The API should then be reachable at the mapped host port.
Definition of Done
- Dockerfile committed.
-
.dockerignorecommitted. - Image builds successfully.
- Container starts successfully.
- Health endpoint verified.
- Existing tests pass.
- MyPy passes.
- Ruff passes.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 7m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Emil57/ml-platform
-
Difficulty 3/5 1-2 days Newbie friendliness 78/100
Emil57/ml-platform#53 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
Emil57/ml-platform#52 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Emil57/ml-platform#51 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
Emil57/ml-platform#50 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
Emil57/ml-platform#49 ·
All issues in Emil57/ml-platform
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
pytest-dev/pytest-html#1085 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
pollen-robotics/reachy_mini#1527 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
A seed and its negative give the same run, so realizations of a negative seed repeat each otherOpen
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day