fix: use nvdec

This commit is contained in:
ziesorx 2025-09-25 22:16:19 +07:00
parent f9a67935d6
commit b919a1ebe2
5 changed files with 328 additions and 19 deletions

44
build-nvdec.sh Executable file
View file

@ -0,0 +1,44 @@
#!/bin/bash
# Build script for Docker image with NVDEC hardware acceleration support
echo "Building Docker image with NVDEC hardware acceleration support..."
echo "========================================================="
# Build the base image first (with all ML and hardware acceleration dependencies)
echo "Building base image with NVDEC support..."
docker build -f Dockerfile.base -t detector-worker-base:nvdec .
if [ $? -ne 0 ]; then
echo "Failed to build base image"
exit 1
fi
# Build the main application image
echo "Building application image..."
docker build -t detector-worker:nvdec .
if [ $? -ne 0 ]; then
echo "Failed to build application image"
exit 1
fi
echo ""
echo "========================================================="
echo "Build complete!"
echo ""
echo "To run the container with GPU support:"
echo "docker run --gpus all -p 8000:8000 detector-worker:nvdec"
echo ""
echo "Hardware acceleration features enabled:"
echo "- NVDEC for H.264/H.265 video decoding"
echo "- NVENC for video encoding (if needed)"
echo "- TurboJPEG for fast JPEG encoding"
echo "- CUDA for model inference"
echo ""
echo "The application will automatically detect and use:"
echo "1. GStreamer with NVDEC (NVIDIA GPUs)"
echo "2. FFMPEG with CUVID (NVIDIA GPUs)"
echo "3. VAAPI (Intel/AMD GPUs)"
echo "4. TurboJPEG (3-5x faster than standard JPEG)"
echo "========================================================="