Docker reproducibility anecdotes

Beginner Accelerating numerics & developer hygiene
Created by Pavel · 29.04.2026 at 19:11 UTC

Containers pin OS-level dependencies and, with lock files, Python package versions so collaborators and CI rebuild similar environments. They do not replace correctness testing—bad code reproduces faithfully too.

For reproducible ML, pair images with requirements.txt/uv.lock/poetry.lock, fixed seeds, and data versioning (DVC, lakeFS). Docker overhead is engineering trade-off: slower iteration locally vs fewer “works on my machine” incidents.

Docker docs: [1].


Sources

University approvals: 0
Tasks
Question 1

Pinned dependencies inside a Docker image mainly help with:

Hint

Same environment, same behaviour.

Question 2

A colleague says “Docker makes code correct.” What is the accurate response?

Hint

Reproducibility ≠ correctness.

Question 3

freeze_tuple(parts) normalises each part with str(int(str(p))), joins by ., raises ValueError on bad conversion.

Hint

int normalises leading zeros.

Starter code is prefilled; replace TODO blocks with your solution.
1 test case will be used for grading
Run checks runtime behavior only. Final correctness is evaluated when you submit.
Card Info
  • Topic: Accelerating numerics & developer hygiene
  • Difficulty: Beginner
  • Completed: 0 users
Creator
Pavel
Pavel