thadillo Claude commited on
Commit
4e9938a
·
1 Parent(s): c44c772

Add GDAL dependencies for PDF map generation on HF

Browse files

- Install gdal-bin, libgdal-dev for contextily/rasterio
- Set GDAL environment variables for compilation
- Enables OpenStreetMap tile rendering in PDF exports on HF Spaces

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>

Files changed (1) hide show
  1. Dockerfile +9 -1
Dockerfile CHANGED
@@ -4,12 +4,20 @@ FROM python:3.11-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
 
 
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
 
 
 
 
 
13
  # Copy requirements
14
  COPY requirements.txt .
15
 
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies including GDAL for contextily/maps
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
11
+ gdal-bin \
12
+ libgdal-dev \
13
+ python3-gdal \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
+ # Set GDAL environment variables
17
+ ENV GDAL_CONFIG=/usr/bin/gdal-config
18
+ ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
19
+ ENV C_INCLUDE_PATH=/usr/include/gdal
20
+
21
  # Copy requirements
22
  COPY requirements.txt .
23