Vikctor/Drought_Disaster_Models
0
1# -------------------------2# Base image3# -------------------------4FROM python:3.10-slim5 6# -------------------------7# Set working directory8# -------------------------9WORKDIR /app10 11# -------------------------12# Environment variables13# -------------------------14ENV PYTHONDONTWRITEBYTECODE=115ENV PYTHONUNBUFFERED=116ENV HF_HOME=/tmp/hf_cache17 18# -------------------------19# Install system dependencies20# -------------------------21RUN apt-get update && apt-get install -y --no-install-recommends \22 gcc \23 libc-dev \24 && rm -rf /var/lib/apt/lists/*25 26# -------------------------27# Copy requirements and install28# -------------------------29COPY requirements.txt .30RUN pip install --no-cache-dir -r requirements.txt31 32# -------------------------33# Copy application code34# -------------------------35COPY . .36 37# -------------------------38# Expose Hugging Face port39# -------------------------40EXPOSE 786041 42# -------------------------43# Command to run FastAPI44# -------------------------45CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--timeout-keep-alive", "120"]46 