【发布时间】:2017-07-21 09:33:05
【问题描述】:
我正在尝试将 PyPI 中未列出的 python package 与 Google Cloud ML Engine 一起使用。这个包有自己的依赖项,即使在 PyPI 中列出,ML 引擎环境中也没有默认安装,即 Cython 包。
查看documentation 并不清楚在这种情况下如何进行,我尝试将这个包打包在.tar.gz 文件中并在--packages 参数下传递,但我收到以下错误:
File "<string>", line 1, in <module> IOError: [Errno 2] No such file or directory: '/tmp/pip-jnm3Ml-build/setup.py'
在我尝试使用setup.py 文件并打包我的代码后,google cloud ml 引擎无法在dependency_links 中找到该包
这是我目前的setup.py:
from setuptools import find_packages, setup
required_packages = ['cython', 'numpy', 'tensorflow', 'scipy', 'cython']
dependency_links = ['git+https://github.com/lucasb-eyer/pydensecrf.git']
setup(name='trainer',
version='0.1',
packages=['trainer'],
install_requires=required_packages,
dependency_links=dependency_links,
include_package_data=True,
description='description')
我想通过反复试验来避免这样做,因为将作业发送到云会花费金钱,即使它们立即失败。
提前致谢。
【问题讨论】:
标签: python google-cloud-platform google-cloud-ml google-cloud-ml-engine