improved deployment time

This commit is contained in:
2026-02-19 19:19:29 +01:00
parent 88450fd8b6
commit 5ba5cae98f

View File

@@ -1,3 +1,4 @@
# syntax=docker/dockerfile:1
# LinkedIn Post Creation System - Docker Image # LinkedIn Post Creation System - Docker Image
FROM python:3.11-slim FROM python:3.11-slim
@@ -17,8 +18,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
# Copy requirements first for better caching # Copy requirements first for better caching
COPY requirements.txt . COPY requirements.txt .
# Install Python dependencies # Install Python dependencies (CPU-only torch to avoid downloading 2GB CUDA binaries)
RUN pip install --no-cache-dir -r requirements.txt RUN --mount=type=cache,target=/root/.cache/pip \
pip install --extra-index-url https://download.pytorch.org/whl/cpu -r requirements.txt
# Copy application code # Copy application code
COPY . . COPY . .