问题描述
你能帮我在 azureml 环境中运行 python 脚本吗?我创建了工作区和 azure 容器注册表并将 docker 映像推送到容器。这是 dockerfile 的示例:
FROM python:3.7
RUN pip install --upgrade pip
RUN pip install virtualenv
ENV VIRTUAL_ENV=/venv
RUN virtualenv venv -p python3
ENV PATH="VIRTUAL_ENV/bin:$PATH"
workdir /app
ADD . /app
ENV PYTHON_PACKAGES="\
numpy \
pandas \
seaborn \
matplotlib \
sklearn \
scipy \
imbalanced-learn \
xgboost \
joblib \
"
RUN pip install --no-cache-dir $PYTHON_PACKAGES
ENTRYPOINT ["python3","train.py"]
我创建了这样的环境:
myenv = Environment.from_pip_requirements(name = ws.get_details()['name'],file_path = "requirements.txt")
运行实验时出现此错误:
"Message": "AzureMLCompute job Failed.\nJobContainerConfigFailed: Container configuration Failed unexpectedly\n\tJobContainerConfigFailed: Container configuration Failed unexpectedly\n\terr: container setup task Failed: exit status 1\n\tReason: container setup task Failed: exit status 1\n\tInfo: Failed to prepare an environment for the job execution: Job environment preparation Failed on 10.0.0.5 with err exit status 1."
我不明白这个错误是什么意思。
我使用以下配置和提交训练作业:
src = Scriptrunconfig(source_directory='.',script='train.py',compute_target=cpu_cluster,environment=myenv)
#Submit training job
run = Experiment(ws,'test-classification').submit(src)
run.wait_for_completion(show_output=True)
谢谢!
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)