Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions airflow/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
FROM apache/airflow:2.5.1

COPY requirements.txt .
USER root

RUN pip install --no-cache-dir -r requirements.txt
# google-cloud-bigquery pulls in Shapely; wheels still expect libgeos_c at runtime.
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgeos-c1v5 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

USER airflow

COPY --chown=airflow:root requirements.txt .

# Postgres 10+ often uses SCRAM-SHA-256; the stock Airflow 2.5 image can ship
# psycopg2 linked against libpq < 10. Remove the base wheel first so pip does one
# clean install (avoids a force-reinstall temp tree that spikes disk use).
RUN pip uninstall -y psycopg2 psycopg2-binary 2>/dev/null || true \
&& pip install --no-cache-dir -r requirements.txt
1 change: 1 addition & 0 deletions airflow/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Any change made here should accompany an increment
# to the image version on line 5 of docker-compose.yml

psycopg2-binary>=2.9.9,<3
dbt-core
dbt-postgres
apache-airflow[google]
Expand Down
6 changes: 2 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
x-airflow-common: &airflow-common
build:
context: ./airflow
image: sagerx_airflow:v0.0.2718 # versioning allows a rebuild of docker image where necessary
image: sagerx_airflow:v0.0.2721 # versioning allows a rebuild of docker image where necessary
networks:
- airflow-dbt-network
env_file:
Expand Down Expand Up @@ -47,9 +47,7 @@ services:
- ./postgres:/docker-entrypoint-initdb.d
- ./airflow/data:/opt/airflow/data
- ./airflow/extracts:/opt/airflow/extracts
build:
context: .
shm_size: "4gb"
shm_size: "4gb"

marimo:
build:
Expand Down