feat: update Dockerfile and requirements for ML dependencies; add base image build workflow
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

This commit is contained in:
Siwat Sirichai 2025-08-10 19:49:24 +07:00
parent 57a51f3ba3
commit 252ef468c9
5 changed files with 64 additions and 20 deletions

15
Dockerfile.base Normal file
View file

@ -0,0 +1,15 @@
# 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"]