Giter Club home page Giter Club logo

airflow-pkg's Introduction

Airflow Packing

Dependency archive for Airflow 2.6.2 with Python 3.9.

Prerequisite

To install Python 3.9 and airflow system dependencies, you can modify the existing TDP build Dockerfile by adding the following section before the entrypoint:

# System dependencies
RUN apt-get -q install -y libffi-dev libldap2-dev
WORKDIR /tmp
# Download and install Python 3.9 source
RUN wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz \
    && tar xzf Python-3.9.6.tgz
RUN cd Python-3.9.6 \
    && ./configure --enable-optimizations \
    && make altinstall

Create dependency archive

Run the following commands from the TDP build container:

TDP_VERSION=TDP-1.0.0
AIRFLOW_VERSION=2.6.2
AIRFLOW=airflow-$AIRFLOW_VERSION-$TDP_VERSION
ARCHIVE=$AIRFLOW.tar.gz
AIRFLOW_EXTRA=[flower,redis,kerberos,celery,apache.hdfs,apache.hive,apache.spark]
cd /tdp
mkdir -p target/$AIRFLOW/dependencies
python3.9 -m venv airflow_venv
source airflow_venv/bin/activate
python3.9 -m pip install --upgrade pip wheel
python3.9 -m pip install psycopg2-binary setuptools python-ldap
python3.9 -m pip install apache-airflow${AIRFLOW_EXTRA}==$AIRFLOW_VERSION --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-$AIRFLOW_VERSION/constraints-3.9.txt"
python3.9 -m pip freeze > target/${AIRFLOW}/requirements.txt
python3.9 -m pip wheel --no-cache-dir --wheel-dir target/${AIRFLOW}/dependencies -r target/${AIRFLOW}/requirements.txt
deactivate
cd target 
tar -czvf $ARCHIVE ${AIRFLOW}
sha256sum $ARCHIVE | sed 's| .*/| |' > $ARCHIVE.sha256

airflow-pkg's People

Contributors

mohamedoud avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.