Update Dockerfile
Browse files1234567891011121314151617181920212223242526272829# 2) Dockerfile (paste as a new file)```dockerfileFROM python:3.10-slim# Avoid interactive tzdata etc.ENV DEBIAN_FRONTEND=noninteractive \PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1# System deps (optional but useful for some libs)RUN apt-get update && apt-get install -y --no-install-recommends \build-essential curl && \rm -rf /var/lib/apt/lists/*WORKDIR /code# Install Python deps first (cached layer)COPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Copy app filesCOPY . .# Expose HF Spaces default portEXPOSE 7860# Start FastAPI with uvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]123456789101112131415161718192021222324252627FROM python:3.10-slim# Environment settingsENV DEBIAN_FRONTEND=noninteractive \PYTHONDONTWRITEBYTECODE=1 \PYTHONUNBUFFERED=1# System dependenciesRUN apt-get update && apt-get install -y --no-install-recommends \build-essential curl && \rm -rf /var/lib/apt/lists/*# Set work directoryWORKDIR /code# Install Python dependenciesCOPY requirements.txt .RUN pip install --no-cache-dir -r requirements.txt# Copy the rest of the appCOPY . .# Expose Hugging Face default portEXPOSE 7860# Start FastAPI app with uvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile+7-9