Skip to content

Commit 08db082

Browse files
authored
Update README.md
1 parent 6123232 commit 08db082

File tree

1 file changed

+73
-0
lines changed
  • deployment-examples/SIOOnDemandAnalytics

1 file changed

+73
-0
lines changed

deployment-examples/SIOOnDemandAnalytics/README.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,79 @@ The other pipeline is a vanilla Folder Watch pipeline.
1212

1313
REST API Flask module is bringing it all together, providing a front-end implementation of the API. Upon request for an analytics, it finds the most recent file generated by the live pipeline, and serves JSON containing the image and relevant analytics. Another flavor of that API will serve an image/jpg, which is useful for debugging.
1414

15+
## Special Instructions for Jetson Devices
16+
17+
When deploying on Jetson devices, additional configuration is required:
18+
19+
1. Set the `SIO_DOCKER_TAG_VARIANT` environment variable to the appropriate value:
20+
```bash
21+
export SIO_DOCKER_TAG_VARIANT=-r32.7.3-arm64v8
22+
```
23+
2. Configure Docker to use the NVIDIA runtime:
24+
```bash
25+
export SIO_DOCKER_RUNTIME=nvidia
26+
```
27+
3. Modify `docker-compose` to add the network:
28+
```yaml
29+
networks:
30+
sh-device-ui_sh-ui-net:
31+
external: true
32+
```
33+
4. Add the following to the analytics service in `docker-compose`:
34+
```yaml
35+
networks:
36+
sh-device-ui_sh-ui-net:
37+
aliases:
38+
- sioanalytics
39+
```
40+
5. Update the pipeline configuration to use the camera URL:
41+
```json
42+
"VIDEO_IN": "rtsp://sh-ui-backend:8555/live"
43+
```
44+
To automate this step, use a `sed` command to replace the `VIDEO_IN` URL in `pipelines.json`:
45+
```bash
46+
sed -i 's|"VIDEO_IN".*:.*"rtsp://.*"|"VIDEO_IN": "rtsp://sh-ui-backend:8555/live"|' config/analytics/pipelines.json
47+
```
48+
49+
## Testing the API
50+
51+
After everything is running, you can test the API by running:
52+
```bash
53+
curl http://<camera_ip or localhost>:8080/alpr/v1.0/locations/100
54+
```
55+
This will return an output similar to the following:
56+
```json
57+
{
58+
"location": {
59+
"id": 100
60+
},
61+
"streamDetail": [
62+
{
63+
"image": [
64+
{
65+
"id": 1,
66+
"imageData": "",
67+
"licensePlate": {
68+
"lpRegion": "unknown",
69+
"lpString": "unknown",
70+
"lpnConfidence": 0
71+
},
72+
"vehicle": {
73+
"color": "unknown",
74+
"make": "unknown",
75+
"model": "unknown"
76+
}
77+
}
78+
],
79+
"preferredImage": 1,
80+
"stream": {
81+
"id": 1
82+
}
83+
}
84+
]
85+
}
86+
```
87+
1588
## Client
1689

1790
A sample client is implemented in `SIOOnDemandAnalytics/clients/OnDemandTest.py`.

0 commit comments

Comments
 (0)