figma / Dockerfile
dina1's picture
Update Dockerfile
2a21b57 verified
raw
history blame contribute delete
990 Bytes
FROM python:3.11-slim
WORKDIR /app
# Upgrade pip
RUN pip install --upgrade pip
# Install system dependencies for Playwright + fonts
RUN apt-get update && apt-get install -y \
wget gnupg ca-certificates curl unzip \
libxkbcommon0 libnss3 libatk1.0-0 libatk-bridge2.0-0 \
libxcomposite1 libxdamage1 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 \
libasound2 libxshmfence1 libxext6 libxfixes3 libdrm2 \
fonts-liberation libappindicator3-1 libnspr4 libx11-xcb1 libxrender1 \
&& rm -rf /var/lib/apt/lists/*
# Copy dependencies and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Playwright + Chromium
RUN pip install --no-cache-dir playwright
RUN playwright install --with-deps chromium
# Copy app
COPY . .
# --- 🔧 Force rebuild marker (prevents EOF caching issue)
RUN echo "Rebuild timestamp: $(date)" > /rebuild_marker.txt
EXPOSE 7860
# Run the FastAPI app
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]