San*_*ta7 2 python environment-variables airflow airflow-scheduler
我正在尝试安装一个名为 Apache Airflow 的程序。
说明显示如何指定主文件夹
# airflow needs a home, ~/airflow is the default,
# but you can lay foundation somewhere else if you prefer
# (optional)
export AIRFLOW_HOME=~/airflow
# install from pypi using pip
pip install apache-airflow
# initialize the database
airflow initdb
Run Code Online (Sandbox Code Playgroud)
https://airflow.apache.org/docs/stable/start.html
我在 Google Colab 工作,我希望该文件夹位于主目录中,即/content. 但是,无论我为 指定什么export AIRFLOW_HOME=,主文件夹始终设置为/root。
到目前为止我已经尝试过的
export AIRFLOW_HOME=~content
export AIRFLOW_HOME=~content/
export AIRFLOW_HOME=~/content
export AIRFLOW_HOME=~/content/airflow
export AIRFLOW_HOME=~/content/airflow/
export AIRFLOW_HOME='pwd'
export AIRFLOW_HOME='pwd' /content/
export AIRFLOW_HOME='pwd' /content
export AIRFLOW_HOME='pwd' content/
export AIRFLOW_HOME='pwd' content
Run Code Online (Sandbox Code Playgroud)
为了方便起见,这里有一个代码的 colab 笔记本,以便于修补
https://colab.research.google.com/drive/1lV-D60qEJN2F4azUYTDVeUCKv6qTyzL3
您可以在当前工作目录中设置如下环境。
export AIRFLOW_HOME="$(pwd)"
Run Code Online (Sandbox Code Playgroud)
例如,如果您pwd是/optroot 用户,那么您可以在cd上面/opt运行。当您运行airflow initdb该airflow.cfg文件时,其他文件将位于此目录中,但如果您希望将这些文件放在单独的airflow文件夹中,那么在运行上述导出语句之前,您可以创建气流目录 ( mkdir airflow) 并cd到该文件夹,然后运行上述导出命令。
| 归档时间: |
|
| 查看次数: |
13172 次 |
| 最近记录: |