问题描述
我正在尝试部署描述为
来自云构建的错误日志.
Epochs:100%|██████████|100/100 [00:16< 00:00,6.04it/s,t_loss = 1.485,i_loss = 0.104,i_acc = 1.000]2020-05-31 18:05:25信息rasa.utils.tensorflow.models-完成培训.2020-05-31 18:05:25 INFO rasa.nlu.model-完成的培训组件.2020-05-31 18:05:25信息rasa.nlu.model-开始训练组件EntitySynonymMapper2020-05-31 18:05:25 INFO rasa.nlu.model-完成的培训组件.2020-05-31 18:05:25 INFO rasa.nlu.model-开始训练组件ResponseSelector2020-05-31 18:05:25信息rasa.nlu.selectors.response_selector-检索意图参数保留为其默认值.该响应选择器将在结合所有检索意图的训练示例上进行训练.2020-05-31 18:05:25 INFO rasa.nlu.model-完成的培训组件.2020-05-31 18:05:25信息rasa.nlu.model-已成功将模型保存到'/tmp/tmpha6sd3hw/nlu'培训核心模型...核心模型训练完成.训练NLU模型...NLU模型训练已完成.追溯(最近一次通话):< module>中的文件"/opt/venv/bin/rasa",第8行sys.exit(main())在主文件中的文件"/opt/venv/lib/python3.7/site-packages/rasa/__main__.py",第108行cmdline_arguments.func(cmdline_arguments)在火车上的第77行中的文件"/opt/venv/lib/python3.7/site-packages/rasa/cli/train.py"nlu_additional_arguments = extract_nlu_additional_arguments(args),在火车上的第52行中的文件"/opt/venv/lib/python3.7/site-packages/rasa/train.py"nlu_additional_arguments = nlu_additional_arguments,在uvloop.loop.Loop.run_until_complete中的文件"uvloop/loop.pyx",行1456在train_async中的第107行,文件"/opt/venv/lib/python3.7/site-packages/rasa/train.py"nlu_additional_arguments = nlu_additional_arguments,_train_async_internal中的文件"/opt/venv/lib/python3.7/site-packages/rasa/train.py",行206fixed_model_name = fixed_model_name,package_model中的文件"/opt/venv/lib/python3.7/site-packages/rasa/model.py",行464create_package_rasa(train_path,output_directory,指纹)在create_package_rasa中的文件"/opt/venv/lib/python3.7/site-packages/rasa/model.py",第258行os.makedirs(输出目录)在makedirs中的文件"/usr/local/lib/python3.7/os.py",第223行mkdir(名称,模式)PermissionError:[Errno 13]权限被拒绝:'models'命令'/bin/bash -o pipefail -c rasa train'返回非零代码:1错误错误:生成步骤0"gcr.io/cloud-builders/docker"失败:步骤以非零状态退出:1
从云shell进行 gcloud应用程序部署
时,也面临着相同的问题
源代码的我的仓库,需要先删除cloudbuild.yaml ,然后再运行 gcloud应用程序部署
这是由于docker的权限问题所致,通过添加 USER root
FROM rasa/rasaUSER根ENV BOT_ENV =生产复制 ./var/wwwWORKDIR/var/wwwRUN rasa火车ENTRYPOINT ["rasa","run",-p","8080"]
I am trying to deploy a rasa project described like here to google app engine, But the build failed due to some permission issues
The scripts try to create a folder inside container,
FROM rasa/rasa
ENV BOT_ENV=production
COPY . /var/www
WORKDIR /var/www
RUN rasa train
ENTRYPOINT [ "rasa", "run", "-p", "8080"]
I have added following permissions to google cloud build.
Error log frome cloud build.
Epochs: 100%|██████████| 100/100 [00:16<00:00, 6.04it/s, t_loss=1.485, i_loss=0.104, i_acc=1.000]
2020-05-31 18:05:25 INFO rasa.utils.tensorflow.models - Finished training.
2020-05-31 18:05:25 INFO rasa.nlu.model - Finished training component.
2020-05-31 18:05:25 INFO rasa.nlu.model - Starting to train component EntitySynonymMapper
2020-05-31 18:05:25 INFO rasa.nlu.model - Finished training component.
2020-05-31 18:05:25 INFO rasa.nlu.model - Starting to train component ResponseSelector
2020-05-31 18:05:25 INFO rasa.nlu.selectors.response_selector - Retrieval intent parameter was left to its default value. This response selector will be trained on training examples combining all retrieval intents.
2020-05-31 18:05:25 INFO rasa.nlu.model - Finished training component.
2020-05-31 18:05:25 INFO rasa.nlu.model - Successfully saved model into '/tmp/tmpha6sd3hw/nlu'
Training Core model...
Core model training completed.
Training NLU model...
NLU model training completed.
Traceback (most recent call last):
File "/opt/venv/bin/rasa", line 8, in <module>
sys.exit(main())
File "/opt/venv/lib/python3.7/site-packages/rasa/__main__.py", line 108, in main
cmdline_arguments.func(cmdline_arguments)
File "/opt/venv/lib/python3.7/site-packages/rasa/cli/train.py", line 77, in train
nlu_additional_arguments=extract_nlu_additional_arguments(args),
File "/opt/venv/lib/python3.7/site-packages/rasa/train.py", line 52, in train
nlu_additional_arguments=nlu_additional_arguments,
File "uvloop/loop.pyx", line 1456, in uvloop.loop.Loop.run_until_complete
File "/opt/venv/lib/python3.7/site-packages/rasa/train.py", line 107, in train_async
nlu_additional_arguments=nlu_additional_arguments,
File "/opt/venv/lib/python3.7/site-packages/rasa/train.py", line 206, in _train_async_internal
fixed_model_name=fixed_model_name,
File "/opt/venv/lib/python3.7/site-packages/rasa/model.py", line 464, in package_model
create_package_rasa(train_path, output_directory, fingerprint)
File "/opt/venv/lib/python3.7/site-packages/rasa/model.py", line 258, in create_package_rasa
os.makedirs(output_directory)
File "/usr/local/lib/python3.7/os.py", line 223, in makedirs
mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: 'models'
The command '/bin/bash -o pipefail -c rasa train' returned a non-zero code: 1
ERROR
ERROR: build step 0 "gcr.io/cloud-builders/docker" failed: step exited with non-zero status: 1
also facing the same issue when doing gcloud app deploy
from cloud shell
my repo of the source code, need to remove cloudbuild.yaml before running gcloud app deploy
It was due to permission issue of the docker, fixed by adding the USER root
FROM rasa/rasa
USER root
ENV BOT_ENV=production
COPY . /var/www
WORKDIR /var/www
RUN rasa train
ENTRYPOINT [ "rasa", "run", "-p", "8080"]
这篇关于将Rasa部署到App Engine时,Google Cloud构建权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!