This repository was archived by the owner on Jan 27, 2026. It is now read-only.
feat(worker): Ability to partition tasks per GPU#602
Closed
JannikSt wants to merge 3 commits into
Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds GPU partitioning support for tasks by extending container naming and orchestration. Key updates include:
- Adding an optional gpu_index field and GPU suffix parsing in TaskContainer.
- Updating DockerService to handle multiple container creation and log aggregation per GPU.
- Adjusting task and container restart logic to support partitioned tasks.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/worker/src/docker/task_container.rs | Added gpu_index field and updated parsing to extract GPU suffix from container names. |
| crates/worker/src/docker/service.rs | Implemented new logic to generate container names per GPU, start containers with GPU-specific environment variables, and aggregate container logs. |
| crates/shared/src/models/task.rs | Added partition_by_gpu flag to Task and TaskRequest models. |
Comments suppressed due to low confidence (2)
crates/worker/src/docker/task_container.rs:27
- [nitpick] Consider adding a brief comment explaining the expected container name format and the rationale for checking the GPU suffix to improve code clarity.
let (config_hash, gpu_index) =
crates/worker/src/docker/service.rs:300
- [nitpick] Refactor the nested check for gpu_index inside the GPU partitioning block to simplify the conditional logic and improve readability.
let container_gpu = if payload.partition_by_gpu && gpu_index.is_some() {
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.