stt-gpu-service / Dockerfile-websocket
Peter Michael Gits
feat: Add standalone WebSocket-only STT service v1.0.0
69f7704
raw
history blame contribute delete
870 Bytes
# Minimal Dockerfile for WebSocket-only STT service
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install minimal system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Create non-root user
RUN useradd -m -u 1000 user
# Switch to user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Copy and install minimal requirements
COPY --chown=user requirements-websocket.txt .
RUN pip install --user --no-cache-dir -r requirements-websocket.txt
# Copy WebSocket server
COPY --chown=user websocket_stt_server.py .
# Expose port
EXPOSE 7860
# Environment variables
ENV GRADIO_SERVER_NAME="0.0.0.0" \
GRADIO_SERVER_PORT=7860
# Run WebSocket-only STT service
CMD ["python3", "websocket_stt_server.py"]