Files
AI-VideoAssistant/engine/Dockerfile
2026-03-11 08:37:34 +08:00

34 lines
962 B
Docker

FROM python:3.12-slim
WORKDIR /app
# Build this image from the project parent directory so both
# engine-v3/engine and fastgpt-python-sdk are available in the context.
# Example:
# docker build -f engine-v3/engine/Dockerfile -t engine-v3 .
# Install system dependencies for audio processing
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
libportaudio2 \
libportaudiocpp0 \
portaudio19-dev \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY engine-v3/engine/requirements.txt /tmp/requirements.txt
COPY fastgpt-python-sdk /deps/fastgpt-python-sdk
RUN pip install --no-cache-dir -r /tmp/requirements.txt \
&& pip install --no-cache-dir /deps/fastgpt-python-sdk
# Copy application code
COPY engine-v3/engine /app
# Create necessary directories
RUN mkdir -p /app/logs /app/data/vad
EXPOSE 8001
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8001"]