Amazon kinesis webrtc python binding in a docker container.
217
Follow the guide on how to setup credentials on python-samples-for-amazon-kinesis-video-streams-with-webrtc.
# First Stage: Build dependencies
FROM debian:bookworm-slim AS builder
# Install system dependencies needed for building
RUN apt-get update && apt-get install -y \
git \
python3 \
python3-venv \
python3-pip \
v4l-utils \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory
WORKDIR /app
# Clone the repository
RUN git clone https://github.com/aws-samples/python-samples-for-amazon-kinesis-video-streams-with-webrtc.git /app
# Create a virtual environment
RUN python3 -m venv /app/.venv
# Copy the requirements file
COPY requirements.txt /app/requirements.txt
# Install dependencies inside the virtual environment
RUN /bin/bash -c "source /app/.venv/bin/activate && pip install --upgrade pip && pip install -r /app/requirements.txt"
# Second Stage: Runtime (Minimal Final Image)
FROM debian:bookworm-slim
# Install only essential runtime dependencies
RUN apt-get update && apt-get install -y \
python3 \
v4l-utils \
&& rm -rf /var/lib/apt/lists/*
# Set up working directory
WORKDIR /app
# Copy the application and virtual environment from the builder stage
COPY --from=builder /app /app
# Set GStreamer environment variables
ENV GST_PLUGIN_SCANNER=/usr/lib/x86_64-linux-gnu/gstreamer1.0/gst-plugin-scanner
# Set up Python environment
ENV PATH="/app/.venv/bin:$PATH"
# Run the application (Modify this based on your usage)
CMD ["/bin/bash"]
aiortc==1.9.0
boto3==1.35.22
python-dotenv==1.0.*
websockets==13.0.1
# for GStreamer
# pycairo==1.27.0
# PyGObject==3.50.0
# for openvino compatibility
# numpy<=1.26.4
# for Viewer
#opencv-python==4.10.*
requests==2.32.*
Content type
Image
Digest
sha256:1936be16c…
Size
116.5 MB
Last updated
over 1 year ago
docker pull bhupiister/kvs-webrtc:amd64