Spaces:
Sleeping
Sleeping
| # Use official Python base | |
| FROM python:3.11-slim | |
| # Set working directory | |
| WORKDIR /app | |
| # Set locales and UTF-8 | |
| ENV LANG=C.UTF-8 | |
| ENV LC_ALL=C.UTF-8 | |
| # Set Hugging Face cache | |
| ENV HF_HOME="/tmp/huggingface" | |
| ENV HF_DATASETS_CACHE="/tmp/huggingface" | |
| ENV TRANSFORMERS_CACHE="/tmp/huggingface" | |
| # Install system dependencies | |
| RUN apt-get update && \ | |
| apt-get install -y --no-install-recommends git build-essential && \ | |
| rm -rf /var/lib/apt/lists/* | |
| # Copy requirements | |
| COPY requirements.txt . | |
| # Install Python dependencies | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy app files | |
| COPY . . | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start Uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |