Skip to content

Add a CPU-first TraceML demo container#223

Open
sahilmathur254 wants to merge 1 commit into
traceopt-ai:version_0.3.5from
sahilmathur254:fix/216-add-a-demo-container-so-a-new-user-c
Open

Add a CPU-first TraceML demo container#223
sahilmathur254 wants to merge 1 commit into
traceopt-ai:version_0.3.5from
sahilmathur254:fix/216-add-a-demo-container-so-a-new-user-c

Conversation

@sahilmathur254

Copy link
Copy Markdown

What changed

  • Add a root Dockerfile based on Python 3.10 slim.
  • Install TraceML from the checked-out source with .[torch].
  • Run the slow DataLoader bottleneck demo in summary mode by default.
  • Exclude repository metadata and local or generated artifacts from the image.
  • Document the CPU-first build and run commands, with GPU access presented only as optional guidance for configured NVIDIA environments.

Why

TraceML did not have a container-based first-run path. This gives new users a single-image demo that requires no host Python environment, external dataset, or GPU and prints the input-bound diagnosis requested in #216.

How I tested

  • Tests added or updated
  • Existing tests run
  • Manual smoke test
  • Not run; reason:

Validation performed in an isolated Docker context:

  • docker build -t traceml-demo .
  • docker run --rm traceml-demo
    • exited with status 0
    • ran on Device: cpu
    • completed 60 training steps
    • printed TraceML Verdict: INPUT-BOUND / CRITICAL
  • Verified the image excludes Git metadata, OS files, Python caches, virtual environments, generated logs, and pip build artifacts.
  • git diff --check

No unit tests were added or run because the change is limited to the container entry point, build context, and documentation; the issue's end-to-end Docker acceptance path was exercised directly.

Runtime impact

  • No training-path impact
  • May affect tracing, runtime, telemetry, or distributed behavior
  • Not sure

Notes: The change only adds an opt-in container entry point and documentation. The locally resolved image is about 3 GB because the current Linux PyTorch dependency set is substantial.

Docs

  • Updated
  • Not needed

Extra context

The default command follows the maintainer-confirmed CPU-first scope:

traceml run examples/diagnosis/dataloader_bottleneck_demo.py --mode=summary --args --scenario slow

The optional --gpus all example does not guarantee CUDA support; it is conditional on NVIDIA Container Toolkit and a CUDA-capable PyTorch installation. GPU execution was not tested and is not an acceptance requirement.

Closes #216

@sahilmathur254
sahilmathur254 changed the base branch from main to version_0.3.5 July 17, 2026 11:51
@sahilmathur254
sahilmathur254 marked this pull request as ready for review July 17, 2026 11:52
@Pendu
Pendu self-requested a review July 18, 2026 21:34
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.

Add a demo container so a new user can try TraceML in one command

1 participant