Skip to content

Commit 7014baa

Browse files
Merge branch 'main' into add_seg_weights
2 parents 1231fba + 675067c commit 7014baa

File tree

83 files changed

+8137
-373
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+8137
-373
lines changed

.release/pypi/inference.cli.setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def read_requirements(path):
6565
},
6666
extras_require={
6767
"cloud-deploy": read_requirements("requirements/requirements.cloud_deploy.txt"),
68+
"cloud-storage": read_requirements("requirements/requirements.cloud_storage.txt"),
6869
},
6970
package_data={"": ["configs/*.yml"]},
7071
install_requires=read_requirements([

docs/install/jetson.md

Lines changed: 62 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,21 @@ If you want more control of the container settings you can also start it
3636
manually. Jetson devices with NVIDIA Jetpack are pre-configured with NVIDIA Container
3737
Runtime and will be hardware accelerated out of the box:
3838

39-
=== "Jetpack 6"
39+
=== "Jetpack 6.2"
40+
```bash
41+
sudo docker run -d \
42+
--name inference-server \
43+
--runtime nvidia \
44+
--read-only \
45+
-p 9001:9001 \
46+
--volume ~/.inference/cache:/tmp:rw \
47+
--security-opt="no-new-privileges" \
48+
--cap-drop="ALL" \
49+
--cap-add="NET_BIND_SERVICE" \
50+
roboflow/roboflow-inference-server-jetson-6.2.0:latest
51+
```
52+
53+
=== "Jetpack 6.0"
4054
```bash
4155
sudo docker run -d \
4256
--name inference-server \
@@ -110,7 +124,22 @@ load each model.
110124

111125
Enable TensorRT by adding `TensorrtExecutionProvider` to the `ONNXRUNTIME_EXECUTION_PROVIDERS` environment variable.
112126

113-
=== "Jetpack 6"
127+
=== "Jetpack 6.2"
128+
```bash
129+
sudo docker run -d \
130+
--name inference-server \
131+
--runtime nvidia \
132+
--read-only \
133+
-p 9001:9001 \
134+
--volume ~/.inference/cache:/tmp:rw \
135+
--security-opt="no-new-privileges" \
136+
--cap-drop="ALL" \
137+
--cap-add="NET_BIND_SERVICE" \
138+
-e ONNXRUNTIME_EXECUTION_PROVIDERS="[TensorrtExecutionProvider,CUDAExecutionProvider,CPUExecutionProvider]" \
139+
roboflow/roboflow-inference-server-jetson-6.2.0:latest
140+
```
141+
142+
=== "Jetpack 6.0"
114143
```bash
115144
sudo docker run -d \
116145
--name inference-server \
@@ -182,7 +211,37 @@ Enable TensorRT by adding `TensorrtExecutionProvider` to the `ONNXRUNTIME_EXECUT
182211

183212
If you are using Docker Compose for your application, the equivalent yaml is:
184213

185-
=== "Jetpack 6"
214+
=== "Jetpack 6.2"
215+
```yaml
216+
version: "3.9"
217+
218+
services:
219+
inference-server:
220+
container_name: inference-server
221+
image: roboflow/roboflow-inference-server-jetson-6.2.0:latest
222+
223+
read_only: true
224+
ports:
225+
- "9001:9001"
226+
227+
volumes:
228+
- "${HOME}/.inference/cache:/tmp:rw"
229+
230+
runtime: nvidia
231+
232+
# Optionally: uncomment the following lines to enable TensorRT:
233+
# environment:
234+
# ONNXRUNTIME_EXECUTION_PROVIDERS: "[TensorrtExecutionProvider,CUDAExecutionProvider,CPUExecutionProvider]"
235+
236+
security_opt:
237+
- no-new-privileges
238+
cap_drop:
239+
- ALL
240+
cap_add:
241+
- NET_BIND_SERVICE
242+
```
243+
244+
=== "Jetpack 6.0"
186245
```yaml
187246
version: "3.9"
188247

inference/core/interfaces/http/http_api.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import base64
22
import concurrent
33
import os
4+
import re
45
from concurrent.futures import CancelledError, Future, ThreadPoolExecutor
56
from functools import partial
67
from threading import Lock, Thread
@@ -1468,7 +1469,14 @@ def validate_workflow(
14681469
@with_route_exceptions_async
14691470
async def initialise_webrtc_worker(
14701471
request: WebRTCWorkerRequest,
1472+
r: Request,
14711473
) -> InitializeWebRTCResponse:
1474+
if str(r.headers.get("origin")).lower() == BUILDER_ORIGIN.lower():
1475+
if re.search(
1476+
r"^https://[^.]+\.roboflow\.[^./]+/", str(r.url).lower()
1477+
):
1478+
request.is_preview = True
1479+
14721480
logger.debug("Received initialise_webrtc_worker request")
14731481
worker_result: WebRTCWorkerResult = await start_worker(
14741482
webrtc_request=request,

inference/core/interfaces/webrtc_worker/entities.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class WebRTCConfig(BaseModel):
2828
class WebRTCWorkerRequest(BaseModel):
2929
api_key: Optional[str] = None
3030
workflow_configuration: WorkflowConfiguration
31+
is_preview: bool = False
3132
webrtc_offer: WebRTCOffer
3233
webrtc_config: Optional[WebRTCConfig] = None
3334
# TODO: to be removed, replaced with webrtc_config
@@ -39,9 +40,6 @@ class WebRTCWorkerRequest(BaseModel):
3940
data_output: Optional[List[str]] = Field(default=None)
4041
declared_fps: Optional[float] = None
4142
rtsp_url: Optional[str] = None
42-
use_data_channel_frames: bool = (
43-
False # When True, expect frames via data channel instead of media track
44-
)
4543
processing_timeout: Optional[int] = WEBRTC_MODAL_FUNCTION_TIME_LIMIT
4644
processing_session_started: Optional[datetime.datetime] = None
4745
requested_plan: Optional[str] = "webrtc-gpu-small"

inference/core/interfaces/webrtc_worker/modal.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ def send_answer(obj: WebRTCWorkerResult):
415415
"plan": webrtc_plan,
416416
"billable": True,
417417
"video_source": video_source,
418+
"is_preview": webrtc_request.is_preview,
418419
},
419420
execution_duration=(
420421
_exec_session_stopped - _exec_session_started

0 commit comments

Comments
 (0)