gpt4 book ai didi

python - 游牧者 : Unable to Run a python script

转载 作者:行者123 更新时间:2023-12-01 02:23:46 24 4
gpt4 key购买 nike

我正在尝试将以下作业提交到我的游牧服务器。该作业基本上使用一个有效负载,它是来 self 的本地主机的 python 文件。

job "agent-collector-bot" {
datacenters = ["staging"]

type = "batch"

periodic {
cron = "*/10 * * * *"
prohibit_overlap = true
}

group "python-bot" {
count = 1
task "slack-bot" {
driver = "raw_exec"

config {
command = "python"
args = ["local/agent-collector-slackbot.py"]
}

dispatch_payload {
file = "agent-collector-slackbot.py"
}

}
}
}

现在,当我看到 nomad 中的工作状态时,它会显示:

snomad 状态代理-收集器-bot/

ID            = agent-collector-bot/periodic-1512465000
Name = agent-collector-bot/periodic-1512465000
Submit Date = 12/05/17 14:40:00 IST
Type = batch
Priority = 50
Datacenters = staging
Status = pending
Periodic = false
Parameterized = false

Summary
Task Group Queued Starting Running Failed Complete Lost
python-bot 1 0 0 0 0 0

Placement Failure
Task Group "python-bot":
* Constraint "missing drivers" filtered 5 nodes

我检查了我的 nomad 客户端(所有 5 个)都安装了 python。有人可以帮助我吗?

最佳答案

输出中指定的驱动程序是 raw_exec,而不是 python。

您需要在客户端配置中启用它 ( nomad raw_exec docs )

client {
options = {
"driver.raw_exec.enable" = "1"
}
}

关于python - 游牧者 : Unable to Run a python script,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47651999/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com