Skip to content
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

C2D Docker #705

Draft
wants to merge 61 commits into
base: main
Choose a base branch
from
Draft

C2D Docker #705

wants to merge 61 commits into from

Conversation

alexcos20
Copy link
Member

@alexcos20 alexcos20 commented Oct 1, 2024

Breaking Changes proposed in this PR (requires other repos to be updated):

Changes proposed in this PR:

  • new freeStartCompute and getComputeStreamableLogs commands
  • c2d using docker engine

All additional work should be based on PRs based against this one

Usage:

 export DOCKER_SOCKET_PATH='/var/run/docker.sock'

and then do a directCommand:

{
    "command": "freeStartCompute",
    "consumerAddress": "0xC7EC1970B09224B317c52d92f37F5e1E4fF6B687",
    "nonce": 1,
    "signature": "0x123",
    "datasets": [
        {
            "fileObject": {
                "type": "url",
                "url": "SOME_DATASET_URL",
                "method": "GET"
            }
        }
    ],
    "algorithm": {
        "fileObject": {
            "type": "url",
            "url": "SOME_ALGO_URL",
            "method": "GET"
        },
        "meta": {
            "container": {
                "image": "SOME_CONTAINER",
                "tag": "latest",
                "entrypoint": "python $ALGO'"
            }
        }
    }
}

@paulo-ocean
Copy link
Contributor

paulo-ocean commented Oct 24, 2024

  • Changes: instead of having dataset and additionalDatasets, we merged them all under datasets

FYI, i've created a PR on Ocean JS related with the breaking changes:
oceanprotocol/ocean.js#1867

other changes also included in this PR here: #735 #737 #736 #739

@paulo-ocean paulo-ocean marked this pull request as ready for review October 24, 2024 12:29
@paulo-ocean paulo-ocean marked this pull request as draft October 24, 2024 12:30
@paulo-ocean paulo-ocean marked this pull request as ready for review October 24, 2024 13:37
@paulo-ocean paulo-ocean marked this pull request as draft October 24, 2024 14:41
This was linked to issues Oct 25, 2024
@paulo-ocean
Copy link
Contributor

paulo-ocean commented Nov 6, 2024

Breaking Changes proposed in this PR (requires other repos to be updated):

Changes proposed in this PR:

  • new freeStartCompute and getComputeStreamableLogs commands
  • c2d using docker engine

All additional work should be based on PRs based against this one

Usage:

 export DOCKER_SOCKET_PATH='/var/run/docker.sock'

and then do a directCommand:

{
    "command": "freeStartCompute",
    "consumerAddress": "0xC7EC1970B09224B317c52d92f37F5e1E4fF6B687",
    "nonce": 1,
    "signature": "0x123",
    "datasets": [
        {
            "fileObject": {
                "type": "url",
                "url": "SOME_DATASET_URL",
                "method": "GET"
            }
        }
    ],
    "algorithm": {
        "fileObject": {
            "type": "url",
            "url": "SOME_ALGO_URL",
            "method": "GET"
        },
        "meta": {
            "container": {
                "image": "SOME_CONTAINER",
                "tag": "latest",
                "entrypoint": "python $ALGO'"
            }
        }
    }
}

Hi @alexcos20 , what if the 'fileObject' is not present on the datasets or on the algorithm ? We need to get it from the service files object? I mean, get the ddos & decrypt the service.files to get these right?
Its also not clear to me, how we pass this, for instance from the CLI -> start compute ... We have no idea to know the fileObject info, without decrypting the service files.. or am i missing something here?
thanks

@jamiehewitt15
Copy link
Member

We should update the documentation to explain how this works and how to set it up.

@jamiehewitt15
Copy link
Member

I tried to test it via the directCommand endpoint but I found it causes the node to crash. I'll give it another go when it's marked as ready for review, as changes are still being made.

@jamiehewitt15
Copy link
Member

Update: it seems to work via the direct command now but I will do some more testing to see if there are any more bugs

@paulo-ocean
Copy link
Contributor

paulo-ocean commented Nov 19, 2024

Update: it seems to work via the direct command now but I will do some more testing to see if there are any more bugs

sure, but this is a draft in progress :-) expect it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C2D.2: Execution layer Docker API C2D.2: Orchestration layer
4 participants