File size: 933 Bytes
0d3f7e1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PIP_NO_CACHE_DIR=1 \
    GRADIO_SERVER_NAME=0.0.0.0 \
    GRADIO_SERVER_PORT=7860

# System dependencies for osmnx / geopandas / shapely / pyproj
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    git \
    curl \
    ca-certificates \
    libgdal-dev \
    gdal-bin \
    libproj-dev \
    proj-bin \
    proj-data \
    libgeos-dev \
    fonts-dejavu-core \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app

# ---- Install Gradio explicitly ----
RUN pip install --upgrade pip \
    && pip install "gradio>=4.0.0"

# ---- Install remaining Python dependencies ----
COPY requirements.txt /app/requirements.txt
RUN pip install -r /app/requirements.txt

# Copy application code
COPY . /app

# Ensure runtime folders exist
RUN mkdir -p /app/posters /app/themes /app/fonts

EXPOSE 7860

CMD ["python", "app.py"]