-
Notifications
You must be signed in to change notification settings - Fork 339
Expand file tree
/
Copy pathDockerfile.connector
More file actions
38 lines (32 loc) · 1.46 KB
/
Dockerfile.connector
File metadata and controls
38 lines (32 loc) · 1.46 KB
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
FROM python:3.10-slim-bookworm AS connector-slim
LABEL org.opencontainers.image.authors="Flyte Team <users@flyte.org>"
LABEL org.opencontainers.image.source=https://github.com/flyteorg/flytekit
ARG VERSION
RUN apt-get update && apt-get install build-essential -y \
&& pip install uv
# Pin pendulum<3.0: Apache Airflow (via flytekitplugins-airflow) imports
# pendulum.tz.timezone() at module load time (airflow/settings.py).
# Pendulum 3.x changed the tz API, causing the connector to crash on startup:
# airflow/settings.py → TIMEZONE = pendulum.tz.timezone("UTC") → AttributeError
# Without this pin, uv resolves to pendulum 3.x which breaks the import chain:
# pyflyte serve connector → load_implicit_plugins → airflow → pendulum → crash
RUN uv pip install --system --no-cache-dir -U \
"pendulum>=2.0.0,<3.0" \
flytekit[connector]==$VERSION \
flytekitplugins-airflow==$VERSION \
flytekitplugins-bigquery==$VERSION \
flytekitplugins-k8sdataservice==$VERSION \
flytekitplugins-openai==$VERSION \
flytekitplugins-slurm==$VERSION \
flytekitplugins-snowflake==$VERSION \
flytekitplugins-awssagemaker==$VERSION \
&& apt-get clean autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/ \
&& :
CMD ["pyflyte", "serve", "connector", "--port", "8000"]
FROM connector-slim AS connector-all
ARG VERSION
RUN uv pip install --system --no-cache-dir -U \
flytekitplugins-mmcloud==$VERSION \
flytekitplugins-spark==$VERSION