【问题标题】:Enable pySpark on Airflow for Docker在 Airflow 上为 Docker 启用 pySpark
【发布时间】:2020-01-28 20:49:23
【问题描述】:

我正在使用 pucker/docker-airflow 图像在 Docker 上运行 Airflow

docker run -d -p 8080:8080 puckel/docker-airflow webserver   

如何使 pySpark 可用?

我的目标是能够在我的 DAG 任务中使用 Spark。

有什么建议吗?

【问题讨论】:

标签: docker pyspark airflow


【解决方案1】:

创建一个requirements.txt,在这个文件中添加所有依赖,然后按照:https://github.com/puckel/docker-airflow#install-custom-python-package

- Create a file "requirements.txt" with the desired python modules
- Mount this file as a volume -v $(pwd)/requirements.txt:/requirements.txt (or add it as a volume in docker-compose file)
- The entrypoint.sh script execute the pip install command (with --user option)

【讨论】:

    猜你喜欢
    • 2022-07-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多