KSvend Claude Happy commited on
Commit
194479a
·
1 Parent(s): 1388ca3

fix: force binary-only wheels for heavy deps to speed up Docker build

Browse files

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>

Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -3,17 +3,18 @@ FROM python:3.11-slim
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
- g++ \
7
  libgeos-dev \
8
  libproj-dev \
9
  proj-data \
10
  proj-bin \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Install dependencies first (cached layer)
14
  COPY pyproject.toml .
15
  COPY app/__init__.py app/__init__.py
16
- RUN pip install --no-cache-dir --prefer-binary .
 
 
17
 
18
  # Copy application code
19
  COPY app/ app/
 
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
 
6
  libgeos-dev \
7
  libproj-dev \
8
  proj-data \
9
  proj-bin \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Install dependencies as binary wheels (fast, no compilation)
13
  COPY pyproject.toml .
14
  COPY app/__init__.py app/__init__.py
15
+ RUN pip install --no-cache-dir --only-binary :all: \
16
+ numpy scipy matplotlib cartopy geopandas shapely pyproj rioxarray xarray \
17
+ && pip install --no-cache-dir .
18
 
19
  # Copy application code
20
  COPY app/ app/