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

View file

@ -1,19 +1,11 @@
# Use the official Python image from the Docker Hub
FROM python:3.13-bookworm
# Use our pre-built base image with ML dependencies
FROM git.siwatsystem.com/adsist-cms/worker-base:latest
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container at /app
# Copy and install application requirements (frequently changing dependencies)
COPY requirements.txt .
# Update apt, install libgl1, and clear apt cache
RUN apt update && apt install -y libgl1 && rm -rf /var/lib/apt/lists/*
# Install any dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code into the container at /app
# Copy the application code
COPY . .
# Run the application