-
Notifications
You must be signed in to change notification settings - Fork 1
airflow/leaf-pipeline: add DAG, Docker & LFS config (rebased on origi… #331
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
Open
Sara-git-218
wants to merge
2
commits into
main
Choose a base branch
from
feature/airflow-leaf-pipeline-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| projects/leaf-counting/weights/*.pt filter=lfs diff=lfs merge=lfs -text | ||
| projects/leaf-counting/weights/*.pth filter=lfs diff=lfs merge=lfs -text | ||
| projects/leaf-counting/weights/*.safetensors filter=lfs diff=lfs merge=lfs -text | ||
| # אם יש גם מודלים בתיקיות אחרות (דוגמה): | ||
| projects/Detection_Jobs/**/models/* filter=lfs diff=lfs merge=lfs -text | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,40 +1,84 @@ | ||
| # --- Secrets and Certificates --- | ||
| *.env | ||
| *.crt | ||
| */certs/ | ||
| **/certs/ | ||
| **/secrets/ | ||
| storage_with_mqtt/secrets/ | ||
| storage_with_mqtt/mqtt_images/secrets/ | ||
| MQTT_IMAGES/secrets/ | ||
| services/sounds/sounds_classifier/src/classification/data/ | ||
| services/sounds/sounds_classifier/src/classification/models/panns_data/ | ||
| # === OS / Editors === | ||
| .DS_Store | ||
| *.swp | ||
| *.swo | ||
| .idea/ | ||
| .vscode/ | ||
| *.code-workspace | ||
|
|
||
| # --- Python --- | ||
| # === Python === | ||
| __pycache__/ | ||
| *.pyc | ||
| *.py[cod] | ||
| *.pyo | ||
| *.pyd | ||
| *.pytest_cache/ | ||
| .venv/ | ||
| venv/ | ||
| *.egg-info/ | ||
| .eggs/ | ||
| .build/ | ||
| build/ | ||
| dist/ | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache/ | ||
| .ipynb_checkpoints/ | ||
|
|
||
| # --- VSCode / Editor --- | ||
| .vscode/ | ||
| .idea/ | ||
| # Virtual envs | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
|
|
||
| # --- Docker / Build --- | ||
| *.log | ||
| *.pid | ||
| *.bak | ||
| *.tmp | ||
| *.swp | ||
| .env.local | ||
| # === Docker / Compose === | ||
| docker.env | ||
| .env | ||
| .env.* | ||
| !.env.example | ||
| .env.local | ||
| .envrc | ||
|
|
||
| # --- OS files --- | ||
| .DS_Store | ||
| Thumbs.db | ||
| # === Airflow (ארטיפקטים/לוגים/DB) === | ||
| airflow/logs/ | ||
| airflow/airflow.db | ||
| airflow/airflow.db-journal | ||
| airflow/*.pid | ||
| airflow/*webserver*.log | ||
| airflow/*webserver*.out | ||
| airflow/*webserver*.err | ||
| airflow/*scheduler*.log | ||
| airflow/*scheduler*.out | ||
| airflow/*scheduler*.err | ||
| airflow/dags/*.bak.* | ||
| airflow/staging/ | ||
|
|
||
| # === Projects: leaf-counting (ארטיפקטים בלבד) === | ||
| projects/leaf-counting/out_detect/ | ||
| projects/leaf-counting/out_crops/ | ||
| projects/leaf-counting/out_pwb/ | ||
| projects/leaf-counting/runs_local/ | ||
| projects/leaf-counting/.venv/ | ||
| projects/leaf-counting/staging/ | ||
|
|
||
| # === Projects: Detection_Jobs / disease-monitor (ארטיפקטים כלליים) === | ||
| projects/Detection_Jobs/**/__pycache__/ | ||
| projects/Detection_Jobs/**/.mypy_cache/ | ||
| projects/Detection_Jobs/**/.pytest_cache/ | ||
| projects/disease-monitor/**/__pycache__/ | ||
| projects/disease-monitor/**/.mypy_cache/ | ||
| projects/disease-monitor/**/.pytest_cache/ | ||
|
|
||
| # === Secrets / Certs === | ||
| *.key | ||
| *.pem | ||
| *.crt | ||
| *.p12 | ||
| *credentials*.json | ||
| *service_account*.json | ||
| *.secrets.* | ||
| .secrets/ | ||
| secrets/ | ||
| projects/Detection_Jobs/.git.backup-*.tar.gz | ||
| airflow/dags/leaf-counting/runs_local/ | ||
| airflow/dags/leaf-counting/demo_images/ | ||
| airflow/dags/leaf-counting/out_*/ | ||
| projects/Detection_Jobs/**/models/ | ||
| projects/disease-monitor/disease-monitor/alerts.db | ||
| projects/**/.git.backup-*.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| # === OS / Editors === | ||
| .DS_Store | ||
| *.swp | ||
| *.swo | ||
| .idea/ | ||
| .vscode/ | ||
| *.code-workspace | ||
|
|
||
| # === Python === | ||
| __pycache__/ | ||
| *.py[cod] | ||
| *.pyo | ||
| *.pyd | ||
| *.egg-info/ | ||
| .eggs/ | ||
| .build/ | ||
| build/ | ||
| dist/ | ||
| .mypy_cache/ | ||
| .pytest_cache/ | ||
| .coverage | ||
| .coverage.* | ||
| .cache/ | ||
| .ipynb_checkpoints/ | ||
|
|
||
| # Virtual envs | ||
| .venv/ | ||
| venv/ | ||
| env/ | ||
|
|
||
| # === Docker / Compose === | ||
| docker.env | ||
| .env # סודות מקומיים - לא מעלים (נפרסם .env.example בהמשך) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please translate |
||
|
|
||
| # === Airflow (רק ארטיפקטים/לוגים/DB) === | ||
| airflow/logs/ | ||
| airflow/airflow.db | ||
| airflow/airflow.db-journal | ||
| airflow/*.pid | ||
| airflow/*webserver*.log | ||
| airflow/*webserver*.out | ||
| airflow/*webserver*.err | ||
| airflow/*scheduler*.log | ||
| airflow/*scheduler*.out | ||
| airflow/*scheduler*.err | ||
| # קבצי גיבוי של DAG (אלו *.bak.*) | ||
| airflow/dags/*.bak.* | ||
|
|
||
| # קלט/פלט זמני של Airflow (staging) — לא קוד | ||
| airflow/staging/ | ||
|
|
||
| # === Projects: leaf-counting (ארטיפקטים בלבד) === | ||
| projects/leaf-counting/out_detect/ | ||
| projects/leaf-counting/out_crops/ | ||
| projects/leaf-counting/out_pwb/ | ||
| projects/leaf-counting/runs_local/ | ||
| projects/leaf-counting/.venv/ | ||
|
|
||
| # === Projects: Detection_Jobs / disease-monitor (ארטיפקטים כלליים) === | ||
| projects/Detection_Jobs/**/__pycache__/ | ||
| projects/Detection_Jobs/**/.mypy_cache/ | ||
| projects/Detection_Jobs/**/.pytest_cache/ | ||
| projects/disease-monitor/**/__pycache__/ | ||
| projects/disease-monitor/**/.mypy_cache/ | ||
| projects/disease-monitor/**/.pytest_cache/ | ||
|
|
||
| # === Secrets / Certs (למקרה שיש) === | ||
| *.key | ||
| *.pem | ||
| *.crt | ||
| *.p12 | ||
| *credentials*.json | ||
| *service_account*.json | ||
| *.secrets.* | ||
| .secrets/ | ||
| secrets/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| # # Airflow 2.9.3 על Python 3.12 (Debian) | ||
| # FROM apache/airflow:2.9.3-python3.12 | ||
|
|
||
| # USER root | ||
| # RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| # rsync curl && \ | ||
| # rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # # נתקין את דרישות הפרויקט (כולל torch/opencv/ultralytics וכו') + awscli/minio | ||
| # USER airflow | ||
| # COPY projects/leaf-counting/requirements.txt /tmp/req.txt | ||
| # RUN pip install --no-cache-dir -r /tmp/req.txt \ | ||
| # && pip install --no-cache-dir awscli minio | ||
|
|
||
| # # Airflow כבר מותקן בתמונה – אין מה לעשות כאן מעבר | ||
| # Airflow 2.9.3 על Python 3.12 (Debian) | ||
| # FROM apache/airflow:2.9.3-python3.12 | ||
|
|
||
| # USER root | ||
| # # מוסיפים ספריות מערכת הנדרשות ל-OpenCV (כולל libGL) + כלי עזר | ||
| # RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
| # libgl1 \ | ||
| # libglib2.0-0 \ | ||
| # libsm6 \ | ||
| # libxext6 \ | ||
| # libxrender1 \ | ||
| # rsync \ | ||
| # curl \ | ||
| # && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| # # תקיית עבודה עם הרשאות כתיבה למשתמש airflow (UID 50000) | ||
| # RUN mkdir -p /work /opt/airflow/runs_local \ | ||
| # && chown -R airflow:0 /work /opt/airflow/runs_local \ | ||
| # && chmod -R 775 /work /opt/airflow/runs_local | ||
|
|
||
| # # נתקין את דרישות הפרויקט + awscli/minio + opencv-python-headless | ||
| # USER airflow | ||
| # COPY projects/leaf-counting/requirements.txt /tmp/req.txt | ||
| # RUN pip install --no-cache-dir -r /tmp/req.txt && \ | ||
| # pip install --no-cache-dir \ | ||
| # awscli==1.33.0 \ | ||
| # minio==7.2.9 \ | ||
| # opencv-python-headless==4.10.0.84 | ||
| # Airflow 2.9.3 על Python 3.12 | ||
| # FROM apache/airflow:2.9.3-python3.12 | ||
|
|
||
| # # ספריה מערכתית ל-OpenCV | ||
| # USER root | ||
| # RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| # libgl1 \ | ||
| # && rm -rf /var/lib/apt/lists/* | ||
| # USER airflow | ||
|
|
||
| # # תלותי ML/עיבוד תמונה + כלים לענן/MinIO | ||
| # # שמירה על תאימות בינארית: numpy<2; OpenCV headless; YOLO (ultralytics) | ||
| # RUN pip install --no-cache-dir \ | ||
| # "numpy==1.26.4 " \ | ||
| # "opencv-python-headless==4.9.0.80" \ | ||
| # "ultralytics==8.*" \ | ||
| # "boto3" "minio" "awscli" | ||
|
|
||
| # # (אופציונלי אבל מומלץ ל-CPU): PyTorch CPU מפינים הרשמיים | ||
| # RUN pip install --no-cache-dir \ | ||
| # torch==2.3.1+cpu torchvision==0.18.1+cpu \ | ||
| # --index-url https://download.pytorch.org/whl/cpu | ||
| # FROM apache/airflow:2.9.3-python3.10 | ||
| # FROM ghcr.io/apache/airflow:2.9.3-python3.10 | ||
|
|
||
| # FROM quay.io/apache/airflow:2.9.3-python3.10 | ||
|
|
||
|
|
||
| # USER root | ||
| # RUN apt-get update && apt-get install -y --no-install-recommends libgl1 && \ | ||
| # rm -rf /var/lib/apt/lists/* | ||
| # USER airflow | ||
|
|
||
| # RUN python -m pip install --no-cache-dir --upgrade pip | ||
|
|
||
| # RUN pip install --no-cache-dir \ | ||
| # --extra-index-url https://download.pytorch.org/whl/cpu \ | ||
| # torch==2.3.1+cpu torchvision==0.18.1+cpu torchaudio==2.3.1+cpu | ||
|
|
||
| # RUN pip install --no-cache-dir \ | ||
| # numpy==1.26.4 opencv-python-headless==4.9.0.80 ultralytics==8.2.10 \ | ||
| # boto3 minio awscli | ||
| # FROM python:3.10-slim | ||
| FROM mcr.microsoft.com/devcontainers/python:1-3.10-bullseye | ||
|
|
||
|
|
||
| # מערכת מינימלית | ||
| # RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| # libgl1 libglib2.0-0 ffmpeg curl ca-certificates && \ | ||
| # rm -rf /var/lib/apt/lists/* | ||
| # RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| # libgl1 libglib2.0-0 ffmpeg curl ca-certificates \ | ||
| # util-linux procps \ | ||
| # && rm -rf /var/lib/apt/lists/* | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
| libgl1 libglib2.0-0 ffmpeg curl ca-certificates \ | ||
| util-linux procps \ | ||
| && rm -rf /var/lib/apt/lists/* | ||
|
|
||
|
|
||
|
|
||
| # שדרוג כלי build של פייתון | ||
| RUN python -m pip install --no-cache-dir --upgrade pip wheel setuptools | ||
|
|
||
| # === Airflow מ-PyPI עם constraints (עוקף רג'יסטרי) === | ||
| ENV AIRFLOW_VERSION=2.9.3 | ||
| ENV PYTHON_VERSION=3.10 | ||
| ENV CONSTRAINT_URL=https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt | ||
| RUN pip install --no-cache-dir "apache-airflow==${AIRFLOW_VERSION}" --constraint "${CONSTRAINT_URL}" | ||
|
|
||
| # Providers תואמים ל-2.9.3 דרך אותו constraints | ||
| RUN pip install --no-cache-dir \ | ||
| "apache-airflow-providers-docker" \ | ||
| --constraint "${CONSTRAINT_URL}" | ||
|
|
||
|
|
||
| # === PyTorch CPU wheels (מהאינדקס הרשמי) === | ||
| RUN pip install --no-cache-dir \ | ||
| --extra-index-url https://download.pytorch.org/whl/cpu \ | ||
| torch==2.3.1+cpu torchvision==0.18.1+cpu torchaudio==2.3.1+cpu | ||
|
|
||
| # === YOLO/עיבוד-תמונה וכלי עזר === | ||
| RUN pip install --no-cache-dir \ | ||
| numpy==1.26.4 opencv-python-headless==4.9.0.80 ultralytics==8.2.10 \ | ||
| onnx==1.16.1 onnxruntime==1.18.1 \ | ||
| boto3 minio awscli requests tqdm | ||
|
|
||
| # סביבת עבודה ומשתמש לא-root | ||
| RUN useradd -ms /bin/bash airflow | ||
| USER airflow | ||
| WORKDIR /opt/airflow |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please translate