-
Notifications
You must be signed in to change notification settings - Fork 19
add suport for image build #1036
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
Merged
Merged
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
Closed
Member
Author
Member
Author
|
Ocean.js update: oceanprotocol/ocean.js#1993 |
giurgiur99
approved these changes
Sep 11, 2025
Contributor
giurgiur99
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.
LGTM!
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.

Fixes #1026
Changes proposed in this PR:
1. Allow c2d algorithm image to be build on the fly, by adding
dockerfileparameter to algorithm.meta.containerYou can also add additional files, using additionalDockerFiles, which has file name as a key and file content
TBD: Potential Memory Issue
If additionalDockerFiles contains large files, all are loaded into memory at once. For large files, consider streaming them into the tar archive.
Example:
{ "command": "freeStartCompute", "datasets":[], "algorithm": { "meta": { "container": { "dockerfile":"FROM rocm/dev-ubuntu-24.04 as base\r\nRUN apt-get update && apt-get -y install bash curl git wget python3 build-essential\r\n\r\nCOPY . /benchmark\r\nWORKDIR /benchmark\r\nRUN pip install -r requirments.txt --break-system-packages", "additionalDockerFiles":{ "requirments.txt":"pyopencl>=2023.1\r\nnumpy>=1.24" } } }, "envs": { "SEED":"test" } }, "consumerAddress": "0x00", "signature": "123", "nonce": 1, "environment": "0x956cb02fee19ac8466aea8cf1901e3b771b906ed7bc1fb868c3854de6fa338e5-0x14c61b597679187ca041a8eee95d0d5167e550d313a90c29c3867997f3e4ee1c", "resources": [ { "id": "cpu", "amount": 1 }, { "id":"disk", "amount":10000 } ] }2. Add a new type of result: imageLog , when executing getComputeStatus:
{ "owner": "0x00", "did": null, "jobId": "2a66f0bf4587bbb7f2824f6feedc0137240ff2fbd8166e813dcac51fa772791d", "dateCreated": "1757421862.13", "dateFinished": null, "status": 40, "statusText": "Running algorithm ", "results": [ { "filename": "image.log", "filesize": 199, "type": "imageLog", "index": 0 } ] }Sweet: you can always call getResults and pass image.log index, to get a realtime log from image build or pull process, which is especially handy when building large images using dockerfile option
3. changes in processLoop
Removed image pulling from there, as it's time consuming and blocks entire loop.
Image pull/build is now handled in startCompute, before job is handled by main loop