# Start from official slim Python 3.12 image FROM python:3.12.9-slim # Set working directory WORKDIR /app # Install system dependencies required by some packages (geopandas, prophet/cmdstanpy, tensorflow) RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential \ git \ curl \ gcc \ g++ \ libgeos-dev \ libproj-dev \ proj-data \ proj-bin \ libgdal-dev \ pkg-config \ wget \ unzip \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Ensure pip is up to date RUN python -m pip install --upgrade pip setuptools wheel # Copy requirements and install Python dependencies COPY requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r /app/requirements.txt # Copy application source COPY . /app # Create outputs directory RUN mkdir -p /app/outputs /app/data # Expose ports commonly used by Gradio and Uvicorn EXPOSE 7860 8000 # Default command: run the app with python (Gradio will launch) CMD ["python", "app.py"]