nuclio-jupyter
nuclio-jupyter copied to clipboard
How do I deploy an directory(or archive)
Hi,
Thanks to @yaronha, I'm able to deploy a single file.
How do I deploy a directory or archive? My directory will contain the handler.py
and other user modules.
I tried.
import nuclio
spec = nuclio.ConfigSpec(config=spec_data)
nuclio.deploy_file(
"https://s3.amazonaws.com/fifteenrock-odin/nuclio.zip",
dashboard_url=dashboard_url,
name='a-function10',
project=project_name,
output_dir='./output',
spec=spec,
archive=True)
The error I get is
Traceback (most recent call last):
File "/Users/myproject/nuclio_lib/nuclio_server.py", line 197, in <module>
deploy_archive_py(dashboard_url, func_name, project_name, spec_data, "https://s3.amazonaws.com/fifteenrock-odin/nuclio.zip")
File "/Users/myproject/nuclio_lib/nuclio_server.py", line 119, in deploy_archive_py
archive=True)
File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 69, in deploy_file
create_project=create_project)
File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 107, in deploy_zip
tag=tag, verbose=verbose, create_new=create_project)
File "/Users/myproject/venv/lib/python3.6/site-packages/nuclio/deploy.py", line 197, in deploy_config
raise DeployError('failed {} {}'.format(verb, name))
nuclio.utils.DeployError: failed creating a-function10
Also, how can I deploy a local zip file? Going through the code, it seems like it needs a remote url? The S3 link is publicly acccessible. I added a debug statement and I got this:
{"error":"\nError - Timed out waiting for creation state to be set\nCall stack:\nTimed out waiting for creation state to be set\n"}