build(docker): migrate to uv for deterministic builds and fix context#52
Merged
JacksonFergusonDev merged 2 commits intomainfrom Feb 3, 2026
Merged
build(docker): migrate to uv for deterministic builds and fix context#52JacksonFergusonDev merged 2 commits intomainfrom
JacksonFergusonDev merged 2 commits intomainfrom
Conversation
* Un-ignores `uv.lock` so it can be copied into the build context (required for `uv sync`). * Ignores the local `.venv` directory to prevent it from overwriting the container's environment, which was causing "Exec format" errors. * Ignores `requirements.txt` as it is replaced by the lockfile.
Replaces the legacy `pip install -r requirements.txt` workflow with `uv sync` inside the Dockerfile. This ensures the container uses the exact dependency versions defined in `uv.lock` and resolves hash mismatch errors caused by stale requirement files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR overhauls the Docker build process by replacing
pipwithuv. It resolves build failures caused by stalerequirements.txthashes and execution errors caused by leaking the local macOS/Linux virtual environment into the container.Key Changes
ghcr.io/astral-sh/uvto handle dependencies.pip installwithuv sync --frozento enforce strict adherence touv.lock.pyproject.tomlanduv.lockto the build steps.uv.lock: Previously ignored, now required for the build..venv: Prevents the local host's virtual environment (e.g., macOS binaries) from being copied into the Linux container, fixing theexec format errorcrash.requirements.txt: no longer used in the build process.Testing
docker build -t star-ground-test .successfully.docker run -p 8501:8501 star-ground-testand confirmed Streamlit launches without crashing.