Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Build+Deploy from a local directory containing source code and config yaml #84

Open
safurrier opened this issue Jun 11, 2020 · 1 comment

Comments

@safurrier
Copy link

safurrier commented Jun 11, 2020

Requested feature

As a user ideally I would be able use the python integration to build+deploy a Nuclio function by pointing toward a local directory with source code and a config yaml file (or a zip file containing those)

Currently there is similar functionality available for git or a remote zip archive:

Git python example

addr = nuclio.deploy_file('git://github.com/nuclio/nuclio#master:/hack/examples/python/helloworld',name='hw', project='myproj')

Remote Zip Jupyter example

%nuclio deploy https://myurl.com/projects/myfunc-v1.zip -n myfunc -p myproj

Current Functionality

I can build source code from a local file (e.g. .py file) like so:

my_code, _, _ = build_file('path/to/python_function.py')

I can build the config using the ConfigSpec object like so:

build_commands = ["pip install requests"]
spec = nuclio.ConfigSpec(cmd=build_commands).set_env('foo', 'bar')

And combining these two can deploy like so:

addr = deploy_code(my_code, spec=my_ConfigSpec)

Desired Functionality

It would be great to be able to eliminate the need to use ConfigSpec to build a configuration and instead point to a local directory with a yaml file similar to the functionality for git or remote zip files.

# Build and deploy in one step
addr = deploy_code('path/to/code_and_config/', name='hw', project='myproj')
@Rusteam
Copy link

Rusteam commented Aug 16, 2022

I agree, sometimes we have to have multiple *.py files.
For instance, most of CVAT models have multiple .py files that can be deploy with nuctl cli tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants