Skip to content

Commit 493e130

Browse files
committed
app configuration, metrics, inbound ports, GPU access, samples
1 parent 19c7b85 commit 493e130

20 files changed

+763
-378
lines changed

Diff for: docs-source/applications-gpuaccess.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Using the GPU<a name="applications-gpuaccess"></a>
2+
3+
You can access the graphics processor \(GPU\) on the AWS Panorama Appliance to use GPU\-accelerated libraries, or run machine learning models in your application code\. To turn on GPU access, you add GPU access as a requirement to the package configuration after building your application code container\.
4+
5+
**Important**
6+
If you enable GPU access, you can't run model nodes in any application on the appliance\. For security purposes, GPU access is restricted when the appliance runs a model compiled with SageMaker Neo\. With GPU access, you must run your models in application code nodes, and all applications on the device share access to the GPU\.
7+
8+
To turn on GPU access for your application, update the [package manifest](applications-packages.md) after you build the package with the AWS Panorama Application CLI\. The following example shows the `requirements` block that adds GPU access to the application code node\.
9+
10+
**Example package\.json with requirements block**
11+
12+
```
13+
{
14+
"nodePackage": {
15+
"envelopeVersion": "2021-01-01",
16+
"name": "SAMPLE_CODE",
17+
"version": "1.0",
18+
"description": "Computer vision application code.",
19+
"assets": [
20+
{
21+
"name": "code_asset",
22+
"implementations": [
23+
{
24+
"type": "container",
25+
"assetUri": "eba3xmpl71aa387e8f89be9a8c396416cdb80a717bb32103c957a8bf41440b12.tar.gz",
26+
"descriptorUri": "4abdxmpl5a6f047d2b3047adde44704759d13f0126c00ed9b4309726f6bb43400ba9.json",
27+
"requirements": [
28+
{
29+
"type": "hardware_access",
30+
"inferenceAccelerators": [
31+
{
32+
"deviceType": "nvhost_gpu",
33+
"accessType": "open"
34+
}
35+
]
36+
}
37+
]
38+
}
39+
]
40+
}
41+
],
42+
"interfaces": [
43+
...
44+
```
45+
46+
Update the package manifest between the build and packaging steps in your development workflow\.
47+
48+
**To deploy an application with GPU access**
49+
50+
1. To build the application container, use the `build-container` command\.
51+
52+
```
53+
$ panorama-cli build-container --container-asset-name code_asset --package-path packages/123456789012-SAMPLE_CODE-1.0
54+
```
55+
56+
1. Add the `requirements` block to the package manifest\.
57+
58+
1. To upload the container asset and package manifest, use the `package-application` command\.
59+
60+
```
61+
$ panorama-cli package-application
62+
```
63+
64+
1. Deploy the application\.
65+
66+
For sample applications that use GPU access, visit the [aws\-panorama\-samples](https://github.com/aws-samples/aws-panorama-samples) GitHub repository\.

Diff for: docs-source/applications-manifest-parameters.md

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Application parameters<a name="applications-manifest-parameters"></a>
2+
3+
Parameters are nodes that have a basic type and can be overridden during deployment\. A parameter can have a default value and a *decorator*, which instructs the application's user how to configure it\.
4+
5+
**Parameter types**
6+
+ `string` – A string\. For example, `DEBUG`\.
7+
+ `int32` – An integer\. For example, `20`
8+
+ `float32` – A floating point number\. For example, `47.5`
9+
+ `boolean``true` or `false`\.
10+
11+
The following example shows two parameters, a string and a number, which are sent to a code node as inputs\.
12+
13+
**Example graph\.json – Parameters**
14+
15+
```
16+
"nodes": [
17+
{
18+
"name": "detection_threshold",
19+
"interface": "float32",
20+
"value": 20.0,
21+
"overridable": true,
22+
"decorator": {
23+
"title": "Threshold",
24+
"description": "The minimum confidence percentage for a positive classification."
25+
}
26+
},
27+
{
28+
"name": "log_level",
29+
"interface": "string",
30+
"value": "INFO",
31+
"overridable": true,
32+
"decorator": {
33+
"title": "Logging level",
34+
"description": "DEBUG, INFO, WARNING, ERROR, or CRITICAL."
35+
}
36+
}
37+
...
38+
],
39+
"edges": [
40+
{
41+
"producer": "detection_threshold",
42+
"consumer": "code_node.threshold"
43+
},
44+
{
45+
"producer": "log_level",
46+
"consumer": "code_node.log_level"
47+
}
48+
...
49+
]
50+
}
51+
```
52+
53+
You can modify parameters directly in the application manifest, or provide new values at deploy\-time with overrides\. For more information, see [Deploy\-time configuration with overrides](applications-overrides.md)\.

0 commit comments

Comments
 (0)