-
Notifications
You must be signed in to change notification settings - Fork 185
SummaryA runtime image is the image a computing unit runs, built from a Dockerfile the user owns. We have a working prototype and would like opinions before it goes any further — especially This is the same problem area as #7475, approached from the computing unit rather than the The problemToday a user's only way to add a dependency is a Python virtual environment: a list of pip
A shell on a running pod does not close the gap either. That shell is the unprivileged The case that forced it: AlphaFold 3AlphaFold 3 is a sharp example because it This is not a hypothetical dependency. It is the shape of most scientific tooling our users The prototypeRuntime Images in the sidebar → New runtime image → the editor opens pre-filled with flowchart LR
D["user Dockerfile"] --> J["BuildKit Job<br/>(rootless)"]
J -- "push <registry>/<id>:<n>" --> R["in-cluster registry"]
R -- "kubelet pulls" --> P["computing unit pod"]
Four decisions worth commenting on:
It runsAlphaFold 3's data pipeline, on minikube, 2 CPU / 4 GiB, no GPU — AF3 3.0.5 built from
Flipping the UDF back to the default Python environment fails the identical workflow with (Structure prediction is out of scope here: no GPU, no model parameters, no 630 GB databases. Known limits of the prototype
Questions
|
All reactions
Replies: 5 comments 4 replies
This proposal was based on several offline discussions between @aicam @tanishqgandhi1908 and myself, motivated a real use case of Alpha Fold 3.
This proposal includes 1) how to build and maintain an image; and 2) how to use an image for a CU. The first task is what tools such as DockerHub do, so we should avoid inventing the wheels. So I believe we should focus on 2). We can just let a user specify a URL to a DockerHub image when creating a CU, without considering how it's created.
The following are my corresponding thoughts on those questions:
-
Yes
-
Not a focus of this work
-
Not a focus of this work
-
PVEs co-exist with this feature.
-
Not a focus of this work
All reactions
I think this is a really great and natural idea. One of the original things that made containers so popular is being able to more effectively manage complex environmental and library dependencies.
Are there any PRs or patches in progress for this? It would be nice to see a concrete example of how some of this might work.
All reactions
The end-to-end prototype is in progress, will share a demo video and architecture once it's ready. Can start raising PRs based on feedback.
All reactions
We decided to limit the scope of this work for the first version. We will add a new option in admin page so admin can add new CU images to the available Docker images CU-manager can use to start a new CU.
In this context, admin is responsible to build a valid CU image and add dependencies needed and publish it in Docker hub or any public registry and use its link to add it to available CU images user can choose to start a new CU.
All reactions
That sounds like a great way to implement things gradually. Since the CU image is already published it should be a reasonable task, at least at first, for an advanced user to simply make a new Containerfile with the base CU image in the initial FROM statement. Many clusters have private registries or mirrors as well, so it isn't a given that this image even has to be broadly available, just from within the cluster.
All reactions
This implements the reduced scope Ali described above with the demo video at the bottom walks through it.
User experience - the admin
- Go to Admin→ CU Images, fill in two boxes, and a link to the image.
- The link can be a Docker Hub page address copied from the browser, or a plain owner/name: 1.0.
- The row shows Pending → Mirroring → Ready (or Failed), and a Log button shows the copy happening line by line.
- Expect about 5 minutes for a real image - we measured ~4.3 GB on one.
- If something's wrong - tag doesn't exist, image is private, not a Texera image - the log says so plainly and tells you what to do instead.
User experience - user using models
- Creating a computing unit now has an image dropdown. Pick one, or ignore it and get the standard one.
- The choice is made when the unit is created and stays for its life. You can't swap an image under a running unit.
Architecture
- The cluster runs its own small registry. It has a fixed address, and its storage survives restarts - otherwise every image would need re-copying after a reboot.
- Copying is a background job. A tool called skopeo copies registry-to-registry. No download-and-repack, so it stays fast and unprivileged. That job's output is the log you see.
- The image is checked before any of it is copied. We read just the image's config, a few kilobytes, so a wrong link fails in seconds instead of after gigabytes.
- Each copy gets its own tag. Refreshing an image publishes a new one and leaves the old alone, so units already running keep the exact bytes they started with.
- Images are stored in pieces, and a piece the registry already holds is neither fetched again nor stored again. So a second image built on the same base costs only its own layers - in disk and in time.
What happens when a unit is created
- The image is checked first, before anything is saved. It must be Ready, and the registry must really still have it.
- The image is simply substituted into the pod — one container, one image. Nothing else about the unit changes: same limits, same permissions.
- The container runs as a non-root user, and that's pinned by the pod, not left to the image to decide.
- The unit remembers the image's name, not just its ID - so if the image is later deleted, "what is this running?" still has an answer.
- If anything goes wrong mid-creation, the half-made pod is cleaned up so nothing is left stranded.
For database: one new table: cu_image
Please find the demo video below to understand user experience
Please let me know if anything here needs changing, or if there's anything you'd want covered before I open a PR.
Demo Video:
alpha.fold.demo.mp4
All reactions
I mean adding a new registry to the cluster entirely is one way to do it. I would be curious to see the WIP PR if it's fine to share. I sort of thought it would be even more basic- just basically adding a setting so that the CU manager can request some other tag than the existing one (e.g. texera-workflow-computing-unit-1.2.0 or whatever).
All reactions
Sure, let me share once it's ready!
All reactions
@aicam and @tanishqgandhi1908 : I would recommend we first agree on the design before doing a prototype, not the other way around.