{"id":23268,"library":"apache-airflow-providers-singularity","title":"Apache Airflow Provider for Singularity","description":"Apache Airflow provider for Singularity container runtime. Version 3.9.3 supports Airflow >=2.8.0 and Python >=3.10. The provider allows running tasks inside Singularity containers via the SingularityOperator. Release cadence is irregular, tracking Airflow provider releases.","status":"active","version":"3.9.3","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/singularity","tags":["airflow","provider","singularity","container","workflow"],"install":[{"cmd":"pip install apache-airflow-providers-singularity","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core Airflow requirement","package":"apache-airflow","optional":false},{"reason":"Optional dependency for Kubernetes executor compatibility","package":"apache-airflow-providers-cncf-kubernetes","optional":true}],"imports":[{"note":"Old contrib module was removed in Airflow 2.x","wrong":"from airflow.contrib.operators.singularity import SingularityOperator","symbol":"SingularityOperator","correct":"from airflow.providers.singularity.operators.singularity import SingularityOperator"},{"note":"Hook moved to providers package in Airflow 2.0+","wrong":"from airflow.hooks.singularity import SingularityHook","symbol":"SingularityHook","correct":"from airflow.providers.singularity.hooks.singularity import SingularityHook"}],"quickstart":{"code":"from datetime import datetime\nfrom airflow import DAG\nfrom airflow.providers.singularity.operators.singularity import SingularityOperator\n\nwith DAG(\n    dag_id='singularity_example',\n    start_date=datetime(2025, 1, 1),\n    schedule=None,\n    catchup=False,\n) as dag:\n    run_singularity = SingularityOperator(\n        task_id='run_singularity_task',\n        image='docker://busybox:latest',\n        command='echo \"Hello from Singularity\"',\n        force_pull_image=True,\n    )","lang":"python","description":"Minimal DAG using SingularityOperator to run a command in a container."},"warnings":[{"fix":"Upgrade Airflow to >=2.8.0 and Python to >=3.10.","message":"Provider version 3.x requires Airflow >=2.8.0 and Python >=3.10. Older Airflow versions are incompatible.","severity":"breaking","affected_versions":"3.0.0 to 3.9.3"},{"fix":"Migrate to using 'pull_policy' parameter (\"always\", \"if-not-present\", \"never\").","message":"The 'force_pull_image' parameter may be deprecated in future versions; use 'pull_policy' instead.","severity":"deprecated","affected_versions":"3.0.0+"},{"fix":"Ensure Singularity is installed on all Airflow workers that run these tasks.","message":"SingularityOperator requires Singularity to be installed on the worker node. Without it, tasks fail with an executable not found error.","severity":"gotcha","affected_versions":"all"},{"fix":"Pass environment variables via the 'environment' dict in the operator.","message":"The provider does not automatically set environment variables for the container; use 'environment' parameter to pass variables.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Install the provider via `pip install apache-airflow-providers-singularity`. Ensure Airflow >=2.0.","cause":"Provider not installed or Airflow version <2.0","error":"ModuleNotFoundError: No module named 'airflow.providers.singularity'"},{"fix":"Install Singularity (e.g., `apt-get install singularity-container` or build from source).","cause":"Singularity is not installed on the worker node","error":"AirflowException: SingularityOperator requires singularity binary"},{"fix":"Upgrade provider to latest version: `pip install -U apache-airflow-providers-singularity`.","cause":"Using outdated provider version with different parameter name","error":"AttributeError: 'SingularityOperator' object has no attribute 'image'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}