Skip to main content

project-setup-python

Setting up a new Python project that uses ovstream. Use when user asks to create a new Python project, set up ovstream in Python, create a pyproject.toml, or scaffold a streaming app.

소스 정보

저장소
NVIDIA-Omniverse/ovstream
최근 소스 활동
2026년 10월 6일 19:26
감지된 SKILL.md 언어
영어
스타
12
포크
5

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
project-setup-python
description
Setting up a new Python project that uses ovstream. Use when user asks to create a new Python project, set up ovstream in Python, create a pyproject.toml, or scaffold a streaming app.
license
LicenseRef-NvidiaProprietary
author
NVIDIA ovstream
tags
["ovstream","python","setup"]
tools
["Read","Grep"]
# Project Setup (Python) ## Overview ovstream is distributed as a self-contained, platform-tagged Python wheel on PyPI. The wheel bundles the native library (`ovstream.dll` / `libovstream.so`), GStreamer, the bundled `gstnvenc` plugin, and the CUDA runtime — no environment variable tweaks needed after install. ## Project Structure ``` my-streaming-app/ pyproject.toml main.py ``` ## Setup with uv (Recommended) ```bash mkdir my-streaming-app && cd my-streaming-app uv init uv add ovstream ``` Then run: ```bash uv run main.py ``` The resulting `pyproject.toml` looks like: ```toml [project] name = "my-streaming-app" version = "0.1.0" requires-python = ">=3.8" dependencies = [ "ovstream", ] [build-system] requires = ["hatchling"] build-backend = "hatchling.build" ``` ## Setup with pip ```bash pip install ovstream python main.py ``` ## Minimal main.py > **Source:** `examples/python/basic_stream/main.py` snippet `initialize-sdk` > > Followed by: `examples/python/basic_stream/main.py` snippet `create-server` > > Followed by: `examples/python/basic_stream/main.py` snippet `stream-loop` > > Followed by: `examples/python/basic_stream/main.py` snippet `cleanup` ## Optional dependencies | Package | Purpose | |---------|---------| | `ovstream` | The streaming SDK itself. | | `opencv-python` | Required by [`examples/python/local_stream/main_viewer.py`](../../examples/python/local_stream/main_viewer.py) for an OpenCV-rendered SHM reader, and by [`examples/python/local_stream/main_cudashm_viewer.py`](../../examples/python/local_stream/main_cudashm_viewer.py) for the equivalent CUDASHM (GPU-resident) reader. | | `numpy` | Required by `main_viewer.py` (zero-copy numpy view of SHM pixels) and `main_cudashm_viewer.py` (host buffer for the D2H copy used by display). | | `warp-lang` | If you produce CUDA frames with [NVIDIA Warp](https://developer.nvidia.com/warp-python). | | `ovrtx`, `ovstage` | If you compose ovstream with the ovrtx renderer; ovrtx 0.5 and later take scene data from ovstage (see [`examples/python/ovrtx_stream`](../../examples/python/ovrtx_stream/)). | ## Companion package: ovstream_utils The same wheel ships an optional companion module `ovstream_utils` with a small set of frame-pacing primitives: ```python import ovstream_utils with ovstream_utils.Loop(ovstream_utils.LoopConfig(fps_target=60)) as loop: while True: t = loop.tick() # ... render and stream ... ``` `import ovstream_utils` is optional — ovstream's API works on its own. ## Common Pitfalls - ovstream requires Python 3.8 or newer. (ovrtx is more restrictive at 3.10–3.13; if your app composes both, follow ovrtx's range.) - ovstream requires an NVIDIA GPU with a compatible driver. The bundled CUDA runtime needs the **driver-side** CUDA library (`libcuda.so.1` / `nvcuda.dll`) installed by the NVIDIA display driver. - The wheel is platform-tagged; `pip install` automatically picks the matching `linux-x86_64`, `linux-aarch64`, or `windows-x86_64` build. - If you see `ovstream.dll` / `libovstream.so` not found errors, the wheel install didn't complete — run `pip install --force-reinstall --no-deps ovstream` (a plain `pip install ovstream` reports the version as already installed and restores nothing). Setting `OVSTREAM_LIB_PATH` is only needed when running from a source checkout without installing.
GitHub에서 보기