Skip to content

[BUG] uv invocation in run_initial_setup is not compatible with read-only containers #263

@jfroy

Description

@jfroy

Describe the bug

I want to run photon in a read-only container. This used to work with version 1.3.1with a prior version, but failed after I upgraded to 2.0.1 and removed the index data to force an initial download.

The problem is the uv invocation in run_initial_setup:

    def run_initial_setup(self):
        logger.info("Running initial setup...")
        result = subprocess.run(["uv", "run", "-m", "src.entrypoint", "setup"], check=False, cwd="/photon")  # noqa S603

This will attempt to mutate the root fs of the container and fail.

A potential fix is to add the --no-sync flag to uv. This is what I do to run the container (I override the entrypoint). See my HelmRelease.

This uv invocation was introduced by f4c55ad.

To Reproduce

Run photon 2.0.1 in a read-only container with uv run --no-sync -m src.process_manager as the entrypoint with an empty index volume mounted at /photon/data, an empty cache volume mounted at /photon/.cache

Expected behavior

Photon downloads the initial index and runs.

photon-docker configuration:

I use Kubernetes. See my HelmRelease.

System Info

  • Host OS: Talos
  • Host Type: mix of VM and baremetal nodes
  • Hardware details:
    • CPU: non-uniform across nodes, x86-64v3, x86-64v4, Apple M2, ARM Neoverse V2.
    • Available RAM: non-uniform across nodes, minimum 32 GiB
    • Storage Type: node-local NVMe SSD, Ceph cluster on U2 SSDs
    • Storage Size: non-uniform

Debug Logs

2026-02-18 15:27:12,208 - root - INFO - Photon Manager starting...
2026-02-18 15:27:12,208 - root - INFO - Running initial setup...
error: failed to remove file `/photon/.venv/lib/python3.12/site-packages/photon_docker-1.2.1.dist-info/INSTALLER`: Read-only file system (os error 30)
2026-02-18 15:27:12,223 - root - ERROR - Setup failed!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions