cologne-green-project / Dockerfile
GitHub Actions
Deploy from GitHub Actions
8511cb6
raw
history blame contribute delete
832 Bytes
FROM python:3.11-slim
# Install system dependencies for GDAL/rasterio
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libgdal-dev \
gdal-bin \
libgeos-dev \
libproj-dev \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set GDAL environment
ENV GDAL_CONFIG=/usr/bin/gdal-config
WORKDIR /app
# Copy requirements first for caching
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy app files
COPY app.py utils.py ./
# Expose Streamlit port (HF Spaces uses 7860)
EXPOSE 7860
# Health check
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
# Run Streamlit
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.enableCORS=false", "--server.enableXsrfProtection=false"]