python-detector-worker/Dockerfile.base
Siwat Sirichai 252ef468c9
Some checks failed
Build Backend Application and Docker Image / build-docker (push) Failing after 31s
Build Backend Application and Docker Image / deploy-stack (push) Has been skipped
feat: update Dockerfile and requirements for ML dependencies; add base image build workflow
2025-08-10 19:49:24 +07:00

15 lines
No EOL
498 B
Text

# Base image with all ML dependencies
FROM python:3.13-bookworm
# Install system dependencies
RUN apt update && apt install -y libgl1 && rm -rf /var/lib/apt/lists/*
# Copy and install base requirements (ML dependencies that rarely change)
COPY requirements.base.txt .
RUN pip install --no-cache-dir -r requirements.base.txt
# Set working directory
WORKDIR /app
# This base image will be reused for all worker builds
CMD ["python3", "-m", "fastapi", "run", "--host", "0.0.0.0", "--port", "8000"]