airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [airflow] potiuk commented on a change in pull request #6266: [AIRFLOW-2439] Production Docker image support including refactoring of build scripts - depends on [AIRFLOW-5704]
Date Mon, 21 Oct 2019 15:24:04 GMT
potiuk commented on a change in pull request #6266: [AIRFLOW-2439] Production Docker image
support including refactoring of build scripts - depends on [AIRFLOW-5704]
URL: https://github.com/apache/airflow/pull/6266#discussion_r337082176
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -334,56 +380,52 @@ COPY --chown=airflow:airflow airflow/version.py ${AIRFLOW_SOURCES}/airflow/versi
 COPY --chown=airflow:airflow airflow/__init__.py ${AIRFLOW_SOURCES}/airflow/__init__.py
 COPY --chown=airflow:airflow airflow/bin/airflow ${AIRFLOW_SOURCES}/airflow/bin/airflow
 
-# The goal of this line is to install the dependencies from the most current setup.py from
sources
-# This will be usually incremental small set of packages in CI optimized build, so it will
be very fast
-# In non-CI optimized build this will install all dependencies before installing sources.
-RUN pip install -e ".[${AIRFLOW_EXTRAS}]"
-
+# Setting to 1 speeds up building the image. Cassandra driver without CYTHON saves around
10 minutes
+# But might not be suitable for production image
+ENV CASS_DRIVER_NO_CYTHON=""
+ENV CASS_DRIVER_BUILD_CONCURRENCY="8"
 
-WORKDIR ${AIRFLOW_SOURCES}/airflow/www
-
-# Copy all www files here so that we can run npm building for production
-COPY --chown=airflow:airflow airflow/www/ ${AIRFLOW_SOURCES}/airflow/www/
+ENV PATH="/home/airflow/.local/bin:/home/airflow:${PATH}"
 
-# Package NPM for production
-RUN gosu ${AIRFLOW_USER} npm run prod
+# The goal of this line is to install the dependencies from the most current setup.py from
sources
+# This will be usually incremental small set of packages in CI optimized build, so it will
be very fast
+# For production optimised build it is the first time dependencies are installed so it will
be slower
+RUN pip install --user ".[${AIRFLOW_PROD_EXTRAS}]" \
+    && pip uninstall --yes apache-airflow snakebite
 
 Review comment:
   I think I remember why I've done it. For the CI build we currently have snakebite as part
of master when installed few lines above. I had to remove it anyway at some point in time.
But it will not be needed here if we remove it from setup.py

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message