-
Notifications
You must be signed in to change notification settings - Fork 15
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
Improve documentation of exposed service #211
Merged
Merged
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fde10dc
Improve documentation of exposed service
SergioLangaritaBenitez a3fd2da
Merge branch 'dev-slangarita' of github.com:grycap/oscar into dev-sla…
SergioLangaritaBenitez 0b7cd02
Improve documentation of exposed service
SergioLangaritaBenitez f993a74
Improve documentation of exposed service
SergioLangaritaBenitez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -201,8 +201,27 @@ The service will be listening in a URL that follows the next pattern: | |
https://{oscar_endpoint}/system/services/{name of service}/exposed/ | ||
``` | ||
|
||
The following FDL example shows how to expose a simple NGINX server as an OSCAR service: | ||
Now, let's show an example of executing the [Body pose detection](https://marketplace.deep-hybrid-datacloud.eu/modules/deep-oc-posenet-tf.html) ML model of [AI4EOSC/DEEP Open Catalog](https://marketplace.deep-hybrid-datacloud.eu/). We need to have in mind several factors: | ||
|
||
1. Oscar endpoint. `localhost` or `https://{oscar_endpoint}` | ||
2. Path resource. In this case, it is `v2/models/posenetclas/predict/`. Please do not forget the final `/` | ||
3. Use `-k` or `--insecure` if the SSL is false. | ||
4. Input image with the name `people.jpeg` | ||
5. Output. It will create a `.zip` file that has the output | ||
|
||
The following code section represents a schema of the command: | ||
|
||
``` bash | ||
curl {-k} -X POST https://{oscar_endpoint}/system/services/body-pose-detection-async/exposed/{path resource} -H "accept: */*" -H "Content-Type: multipart/form-data" -F "data=@{input image};type=image/png" --output {output file} | ||
``` | ||
|
||
Finally, the complete command that works in [Local Testing](https://docs.oscar.grycap.net/local-testing/) with an image called `people.jpeg` as input and `output_posenet.zip` as output. | ||
|
||
``` bash | ||
curl -X POST localhost/system/services/body-pose-detection-async/exposed/v2/models/posenetclas/predict/ -H "accept: */*" -H "Content-Type: multipart/form-data" -F "data=@people.jpeg;type=image/png" --output output_posenet.zip | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing protocol: "localhost" --> https://localhost |
||
``` | ||
|
||
Another FDL example shows how to expose a simple NGINX server as an OSCAR service: | ||
|
||
``` yaml | ||
functions: | ||
|
@@ -226,4 +245,4 @@ Two active pods of the deployment will be shown with the command `kubectl get po | |
``` text | ||
oscar-svc nginx-dlp-6b9ddddbd7-cm6c9 1/1 Running 0 2m1s | ||
oscar-svc nginx-dlp-6b9ddddbd7-f4ml6 1/1 Running 0 2m1s | ||
``` | ||
``` |
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.
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.
Oscar --> OSCAR