Spaces:
Sleeping
Sleeping
File size: 1,019 Bytes
cc2e1db |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
# 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"]
|