Skip to content
Open
Show file tree
Hide file tree
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
18 changes: 18 additions & 0 deletions Labs/Airflow_Labs/Lab_1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM apache/airflow:2.5.1-python3.7

# Install as airflow user (not root)
USER airflow

# Install packages with --user flag to ensure they go to the right location
RUN pip install --user \
pandas \
scikit-learn \
numpy \
matplotlib \
seaborn
# Any additional packages that might be needed.

# Verify installations
RUN python -c "import pandas; print('pandas:', pandas.__version__)" && \
python -c "import sklearn; print('sklearn:', sklearn.__version__)" && \
python -c "import numpy; print('numpy:', numpy.__version__)"
6 changes: 5 additions & 1 deletion Labs/Airflow_Labs/Lab_1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ Cloud
AIRFLOW__CORE__LOAD_EXAMPLES: 'false'

# Additional python package
_PIP_ADDITIONAL_REQUIREMENTS: ${_PIP_ADDITIONAL_REQUIREMENTS:- pandas }
# 1. edit the Dockerfile with the packages of your interest
# 2. Replace image: ${AIRFLOW_IMAGE_NAME:-apache/airflow:3.1.0} with
image: my-airflow:3.1.0
# 3. build your image
docker build --no-cache -t my-airflow:3.1.0

# Output dir
- ${AIRFLOW_PROJ_DIR:-.}/working_data:/opt/airflow/working_data
Expand Down