Add IPFS HLS streaming and GPU optimizations

- Add IPFSHLSOutput class that uploads segments to IPFS as they're created
- Update streaming task to use IPFS HLS output for distributed streaming
- Add /ipfs-stream endpoint to get IPFS playlist URL
- Update /stream endpoint to redirect to IPFS when available
- Add GPU persistence mode (STREAMING_GPU_PERSIST=1) to keep frames on GPU
- Add hardware video decoding (NVDEC) support for faster video processing
- Add GPU-accelerated primitive libraries: blending_gpu, color_ops_gpu, geometry_gpu
- Add streaming_gpu module with GPUFrame class for tracking CPU/GPU data location
- Add Dockerfile.gpu for building GPU-enabled worker image

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
giles
2026-02-03 20:23:16 +00:00
parent 5bc655f8c8
commit 86830019ad
24 changed files with 4025 additions and 96 deletions

View File

@@ -1811,3 +1811,18 @@ async def delete_friendly_name(actor_id: str, cid: str) -> bool:
actor_id, cid
)
return "DELETE 1" in result
async def update_friendly_name_cid(actor_id: str, old_cid: str, new_cid: str) -> bool:
"""
Update a friendly name's CID (used when IPFS upload completes).
This updates the CID from a local SHA256 hash to an IPFS CID,
ensuring assets can be fetched by remote workers via IPFS.
"""
async with pool.acquire() as conn:
result = await conn.execute(
"UPDATE friendly_names SET cid = $3 WHERE actor_id = $1 AND cid = $2",
actor_id, old_cid, new_cid
)
return "UPDATE 1" in result