-
Notifications
You must be signed in to change notification settings - Fork 45
Compute Worker Use docker-py instead of the current subprocess way of doing things (for podman and docker)
#2065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ObadaS
wants to merge
38
commits into
develop
Choose a base branch
from
compute_workerDockerwithPython
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
wlln
reviewed
Nov 17, 2025
Collaborator
wlln
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in variable name
Compute Worker Use docker-py instead of the current subprocess way of doing things (for podman and docker)
f0a6e34 to
9505d48
Compare
Collaborator
Author
|
I skipped one of the unit tests because it was failing the Circle-CI tests. class LegacyConverterCommandTests(TestCase):
def test_ingestion_command_is_converted_correctly(self):
v15 = 'python $ingestion_program/ingestion.py $input $output $ingestion_program $submission_program'
v2 = 'python /app/program/ingestion.py /app/input_data /app/output /app/program /app/ingested_program'
assert replace_legacy_metadata_command(command=v15, kind='ingestion', is_scoring=False) == v2
def test_scoring_command_is_converted_correctly(self):
v15 = 'python $program/score.py $input $output'
v2 = 'python /app/program/score.py /app/input /app/output'
assert replace_legacy_metadata_command(command=v15, kind='program', is_scoring=False) == v2We already test this in the e2e tests by trying multiple v15 competition. |
df81308 to
b997f60
Compare
…an and docker containers
… compatible with podman and docker
… GPU will be used
…rypoint in Dockerfile.compute worker
…file changes for every branch
48d0dd2 to
0ac5e94
Compare
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.
A brief description of the purpose of the changes contained in this PR.
Changed the code to use the Docker and Podman python packages instead of using the current subprocess way of launching containers for the compute worker.
For Podman containers using GPU, we need podman 5.4 minimum : containers/podman#25171
We these changes, we only need 1 compute worker image which will be able to communicate with the Docker and Podman socket, as well as use the available GPU on the host machine without having to add anything inside the image.
This results in a much smaller image (around 400 MB, down from 1 GB for the Docker image and 700 MB for the podman image)
New option in .env
You can now select which GPU you want to assign to the compute worker if you have multiple.
You can get the list by running
nvidia-ctk cdi list. You then copy the name of the GPU you want and add it in the.envlike this :By default, if
GPU_DEVICEis not set, it will take the value ofnvidia.com/gpu=allNew Github Workflow
I also added workflows to automatically build images and push them to Dockerhub when the
Dockerfile.compute_workerfile andcompute_worker/directory receives changes. The image will have thetesttag when made from the develop branch,release tagandlatesttag when made from the master branch and thebranchNametag when made from a branch that changes the files.Since we can not delete images with the Docker command, we will need to clean up the image registry from time to time.
Issues this PR resolves
#2022
Checklist