improved deployment time
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
# LinkedIn Post Creation System - Docker Image
|
||||
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.txt .
|
||||
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Install Python dependencies (CPU-only torch to avoid downloading 2GB CUDA binaries)
|
||||
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 . .
|
||||
|
||||
Reference in New Issue
Block a user