Skip to content

Dockerfile ENTRYPOINT downloads dev dependencies at runtime #40

@zkoppert

Description

@zkoppert

Problem

The Dockerfile correctly excludes dev dependencies at build time with uv sync --frozen --no-dev, but the ENTRYPOINT uses uv run without --no-dev:

RUN uv sync --frozen --no-dev --no-editable
# ...
ENTRYPOINT ["uv", "run", "--project", "/action/workspace"]

uv run re-syncs the environment by default, which pulls in the full [dependency-groups] dev group at container startup. This causes ~15MB of unnecessary downloads on every run:

Downloading pygments (1.2MiB)
Downloading black (1.7MiB)
Downloading mypy (13.0MiB)

These are CI/linting tools (black, mypy, pygments via pytest) that are not needed at runtime. This adds several seconds to every action invocation.

Fix

Add --no-dev to the uv run entrypoint:

ENTRYPOINT ["uv", "run", "--no-dev", "--project", "/action/workspace"]

This tells uv run to respect the same --no-dev constraint used during uv sync, skipping the dev dependency resolution and download entirely.

Impact

  • Eliminates ~15MB of unnecessary downloads per run
  • Reduces action startup time by several seconds
  • No functional change - the action only uses runtime dependencies (github3-py, cryptography, pyjwt, python-dotenv, requests)

Metadata

Metadata

Assignees

Labels

performancePerformance improvements

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions