Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dev/Dockerfile + Add uv pip install for faster build time #997

Merged
merged 2 commits into from
May 29, 2024
Merged
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
12 changes: 11 additions & 1 deletion dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ FROM quay.io/astronomer/astro-runtime:11.3.0-base

USER root


# dbt-postgres 1.8.0 requires building psycopg2 from source
RUN /bin/sh -c set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends build-essential libpq-dev; \
apt-get clean; \
rm -rf /var/lib/apt/lists/*

RUN pip install -U uv

COPY ./pyproject.toml ${AIRFLOW_HOME}/astronomer_cosmos/
COPY ./README.rst ${AIRFLOW_HOME}/astronomer_cosmos/
COPY ./cosmos/ ${AIRFLOW_HOME}/astronomer_cosmos/cosmos/

# install the package in editable mode
RUN pip install -e "${AIRFLOW_HOME}/astronomer_cosmos"[dbt-postgres,dbt-databricks]
RUN uv pip install --system -e "${AIRFLOW_HOME}/astronomer_cosmos"[dbt-postgres,dbt-databricks]

# make sure astro user owns the package
RUN chown -R astro:astro ${AIRFLOW_HOME}/astronomer_cosmos
Expand Down
Loading