Skip to content

Commit

Permalink
Install requirements.txt by default during dev env spin up (#1099)
Browse files Browse the repository at this point in the history
I bumped the astronomer image to 11.6 since it uses the newest airflow,
incorporating [tatiana's change in airflow
version](apache/airflow#39670) for datasets and
I am installing requirements.txt by default in the image, since if the
user wants to add some custom package, he needs to change not only the
requirements.txt file but also the Dockerfile. With this only adding
dependencies to requirements.txt will already install them in the image
for dev development.
  • Loading branch information
CorsettiS authored Jul 17, 2024
1 parent d316b7a commit 87b2b14
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/astronomer/astro-runtime:11.3.0-base
FROM quay.io/astronomer/astro-runtime:11.6.0-base

USER root

Expand All @@ -15,9 +15,11 @@ 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/

COPY ./dev/requirements.txt ${AIRFLOW_HOME}/requirements.txt
# install the package in editable mode
RUN uv pip install --system -e "${AIRFLOW_HOME}/astronomer_cosmos"[dbt-postgres,dbt-databricks]
RUN uv pip install --system -e "${AIRFLOW_HOME}/astronomer_cosmos"[dbt-postgres,dbt-databricks] && \
uv pip install --system -r ${AIRFLOW_HOME}/requirements.txt


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

0 comments on commit 87b2b14

Please sign in to comment.