我已经通过运行以下命令安装了 databricks cli 工具
pip install databricks-cli
使用适合您的 Python 安装的 pip 版本。如果您使用的是 Python 3,请运行 pip3。
然后,通过创建 PAT(Databricks 中的个人访问令牌),我运行以下 .sh bash 脚本:
# You can run this on Windows as well, just change to a batch files
# Note: You need the Databricks CLI installed and you need a token configued
#!/bin/bash
echo "Creating DBFS direcrtory"
dbfs mkdirs dbfs:/databricks/packages
echo "Uploading cluster init script"
dbfs cp --overwrite python_dependencies.sh dbfs:/databricks/packages/python_dependencies.sh
echo "Listing DBFS direcrtory"
dbfs ls dbfs:/databricks/packages
Run Code Online (Sandbox Code Playgroud)
python_dependency.sh 脚本
#!/bin/bash
# Restart …
Run Code Online (Sandbox Code Playgroud)