Giter VIP home page Giter VIP logo

bentoctl's Introduction

BentoML: Unified Model Serving Framework

Unified Model Serving Framework

🍱 Build model inference APIs and multi-model serving systems with any open-source or custom AI models. 👉 Join our Slack community!

License: Apache-2.0 Releases CI Twitter Community

What is BentoML?

BentoML is a Python library for building online serving systems optimized for AI apps and model inference.

  • 🍱 Easily build APIs for Any AI/ML Model. Turn any model inference script into a REST API server with just a few lines of code and standard Python type hints.
  • 🐳 Docker Containers made simple. No more dependency hell! Manage your environments, dependencies and model versions with a simple config file. BentoML automatically generates Docker images, ensures reproducibility, and simplifies how you deploy to different environments.
  • 🧭 Maximize CPU/GPU utilization. Build high performance inference APIs leveraging built-in serving optimization features like dynamic batching, model parallelism, multi-stage pipeline and multi-model inference-graph orchestration.
  • 👩‍💻 Fully customizable. Easily implement your own APIs or task queues, with custom business logic, model inference and multi-model composition. Supports any ML framework, modality, and inference runtime.
  • 🚀 Ready for Production. Develop, run and debug locally. Seamlessly deploy to production with Docker containers or BentoCloud.

Getting started

Install BentoML:

# Requires Python≥3.8
pip install -U bentoml

Define APIs in a service.py file.

from __future__ import annotations

import bentoml

@bentoml.service(
    resources={"cpu": "4"}
)
class Summarization:
    def __init__(self) -> None:
        import torch
        from transformers import pipeline

        device = "cuda" if torch.cuda.is_available() else "cpu"
        self.pipeline = pipeline('summarization', device=device)

    @bentoml.api(batchable=True)
    def summarize(self, texts: list[str]) -> list[str]:
        results = self.pipeline(texts)
        return [item['summary_text'] for item in results]

Run the service code locally (serving at http://localhost:3000 by default):

pip install torch transformers  # additional dependencies for local run

bentoml serve service.py:Summarization

Now you can run inference from your browser at http://localhost:3000 or with a Python script:

import bentoml

with bentoml.SyncHTTPClient('http://localhost:3000') as client:
    summarized_text: str = client.summarize([bentoml.__doc__])[0]
    print(f"Result: {summarized_text}")

Deploying your first Bento

To deploy your BentoML Service code, first create a bentofile.yaml file to define its dependencies and environments. Find the full list of bentofile options here.

service: "service:Summarization" # Entry service import path
include:
  - "*.py" # Include all .py files in current directory
python:
  packages: # Python dependencies to include
  - torch
  - transformers
docker:
  python_version: 3.11

Then, choose one of the following ways for deployment:

🐳 Docker Container

Run bentoml build to package necessary code, models, dependency configs into a Bento - the standardized deployable artifact in BentoML:

bentoml build

Ensure Docker is running. Generate a Docker container image for deployment:

bentoml containerize summarization:latest

Run the generated image:

docker run --rm -p 3000:3000 summarization:latest
☁️ BentoCloud

BentoCloud provides compute infrastructure for rapid and reliable GenAI adoption. It helps speed up your BentoML development process leveraging cloud compute resources, and simplify how you deploy, scale and operate BentoML in production.

Sign up for BentoCloud for personal access; for enterprise use cases, contact our team.

# After signup, run the following command to create an API token:
bentoml cloud login

# Deploy from current directory:
bentoml deploy .

bentocloud-ui

For detailed explanations, read Quickstart.

Use cases

Check out the examples folder for more sample code and usage.

Advanced topics

See Documentation for more tutorials and guides.

Community

Get involved and join our Community Slack 💬, where thousands of AI/ML engineers help each other, contribute to the project, and talk about building AI products.

To report a bug or suggest a feature request, use GitHub Issues.

Contributing

There are many ways to contribute to the project:

Thanks to all of our amazing contributors!

Usage tracking and feedback

The BentoML framework collects anonymous usage data that helps our community improve the product. Only BentoML's internal API calls are being reported. This excludes any sensitive information, such as user code, model data, model names, or stack traces. Here's the code used for usage tracking. You can opt-out of usage tracking by the --do-not-track CLI option:

bentoml [command] --do-not-track

Or by setting the environment variable:

export BENTOML_DO_NOT_TRACK=True

License

Apache License 2.0

bentoctl's People

Contributors

aarnphm avatar cxz avatar davkime avatar frostming avatar jjmachan avatar judahrand avatar krasserp avatar mauricioalarcon avatar parano avatar ssheng avatar timliubentoml avatar yubozhao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

bentoctl's Issues

Create machines with GPU using bentoctl Google Compute Engine Operator (new template)

I am trying to create a machine with GPU using bentoctl with Google Cloud Engine Operator but I believe the way terraform calls docker run does not consider the --gpus all tag. I think that the solution should be in the module "gce-container" inside the terraform template. The code could be found below:

module "gce-container" {
  # https://registry.terraform.io/modules/terraform-google-modules/container-vm/google/latest
  source         = "terraform-google-modules/container-vm/google"
  cos_image_name = "cos-stable-77-12371-89-0"
  container = {
    image = "${data.google_container_registry_image.bento_service.image_url}:${var.image_version}"
    env = [
      {
        name  = "BENTOML_PORT"
        value = "3000"
      },
    ]
  }

  restart_policy = "Always"
}

To verify if a GPU really exists in the GCP Virtual Machine I am printing a counter using Tensorflow:

print("Num GPUs Available: ", len(tf.config.list_physical_devices('GPU')))

This is related to this terraform documentation below, but I dont see any GPU related param.

Adding any operator throws a `git access error`

Describe the bug
Trying to add any operator to bentoctl errors out with a git clone related issue

To Reproduce

Steps to reproduce the issue:

  1. Install the latest pre release via pip install —pre bentoctl==1.0.0a4
  2. Try to install sagemaker via bentoctl operator add aws-sagemaker or bentoctl operator add aws-lambda returns
Traceback (most recent call last):
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/bin/bentoctl", line 8, in <module>
    sys.exit(bentoctl())
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/cli/utils.py", line 43, in wrapper
    return func(*args, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/cli/operator_management.py", line 82, in add
    operator_name = local_operator_registry.add(name)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/operator/registry.py", line 93, in add
    content_path = _clone_git_repo(git_url, branch=branch)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/bentoctl/operator/utils.py", line 85, in _clone_git_repo
    repo = Repo.clone_from(git_url, temp_operator_repo)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/repo/base.py", line 1148, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, multi_options, **kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/repo/base.py", line 1086, in _clone
    finalize_process(proc, stderr=stderr)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/util.py", line 386, in finalize_process
    proc.wait(**kwargs)
  File "/Users/mauricio/git/aws-sagemaker-deploy/.venv/lib/python3.8/site-packages/git/cmd.py", line 501, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v [email protected]:bentoml/aws-lambda-deploy.git /var/folders/64/692xs7fj6zb2f87tbtlkj72w0000gn/T/tmphe5wh9du
  stderr: 'Cloning into '/var/folders/64/692xs7fj6zb2f87tbtlkj72w0000gn/T/tmphe5wh9du'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
'

build fails with no such file or directory

Hi,

when building a dockerized image of a bento an error accurred.
To Reproduce

Steps to reproduce the issue:
bentoctl build -b summarization:latest

Expected behavior
Builds the docker image

pip install bentoctl==0.3.4 fixes this issue temporally

Screenshots/Logs

In debug mode. Intermediate bento saved to /tmp/bentoctl-temp-3bbhxx8b
Traceback (most recent call last):
  File "/home/loginuser/anaconda3/envs/bentoml/bin/bentoctl", line 8, in <module>
    sys.exit(bentoctl())
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoctl/cli/utils.py", line 92, in wrapper
    return_value = func(*args, **kwargs)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoctl/cli/utils.py", line 57, in wrapper
    return func(*args, **kwargs)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoctl/cli/utils.py", line 26, in wrapper
    return func(*args, **kwargs)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoctl/cli/__init__.py", line 316, in build
    generate_deployable_container(
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoctl/docker_utils.py", line 120, in generate_deployable_container
    backend.build(**buildx_args)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/site-packages/bentoml/_internal/container/base.py", line 186, in build
    return subprocess.check_output(commands, cwd=context_path, env=env)
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/home/loginuser/anaconda3/envs/bentoml/lib/python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmphhd9d2uxfsTempFS/'

Environment:

  • OS: Ubuntu 22.04.2 LTS
  • Python Version 3.9 (conda)
  • BentoML Version 1.1.7
  • Bentoctl Version 0.4.0
  • Docker version 24.0.5, build ced0996

Additional context
bentoml/azure-container-instances-deploy#10

error with line endings when generating Dockerfile on windows systems

Describe the bug
resources that explain more about this bug

I encounter the below error when trying to build the model image using bentoctl build . Can you please help me.
Command tried :
$ bentoctl build -b cancer_classifier:apmmnnyq22egxjcc -f ./deployment_config.yaml

Error Encountered

**_error: failed to solve: executor failed running [/bin/bash -eo pipefail -c bash <<EOF**
**set -euxo pipefail**

**if [ -f /home/bentoml/bento/env/python/install.sh ]; then**
  **echo "install.sh to install python packages..."**
  **chmod +x /home/bentoml/bento/env/python/install.sh**
  **/home/bentoml/bento/env/python/install.sh**
**fi**
**EOF]: exit code: 2**
Traceback (most recent call last):
  File "C:\Users\nayak\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\nayak\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\nayak\anaconda3\Scripts\bentoctl.exe\__main__.py", line 7, in <module>
    sys.exit(bentoctl())
  File "C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\nayak\AppData\Roaming\Python\Python39\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py", line 90, in wrapper
    return_value = func(*args, **kwargs)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py", line 55, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\cli\__init__.py", line 147, in build
    generate_deployable_container(
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoctl\docker_utils.py", line 99, in generate_deployable_container
    buildx.build(**buildx_args)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoml\_internal\utils\buildx.py", line 301, in build
    run_docker_cmd(cmds, env=subprocess_env, cwd=cwd)
  File "C:\Users\nayak\anaconda3\lib\site-packages\bentoml\_internal\utils\buildx.py", line 314, in run_docker_cmd
    subprocess.check_output(list(map(str, cmds)), env=subprocess_env, cwd=cwd)
  File "C:\Users\nayak\anaconda3\lib\subprocess.py", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\Users\nayak\anaconda3\lib\subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['docker', 'buildx', 'build', '--progress', 'auto', '--tag', 'aws-lambda-cancer_classifier:apmmnnyq22egxjcc', '--platform', 'linux/amd64', '--file', 'env/docker/Dockerfile', '.']' returned non-zero exit status 1.
nayak (master *) BentoML_

To Reproduce
Steps to reproduce the issue:

  1. $ bentoml list
    Tag Size Creation Time Path
    cancer_classifier:apmmnnyq22egxjcc 32.96 KiB 2022-07-31 19:08:13 ~\bentoml\bentos\cancer_classifier\apmmnnyq22egxjcc

  2. bentofile.yaml
    service: "service:svc"
    description: "My XGBoost service"
    python:
    packages:

    • xgboost
  3. bentoctl operator install aws-lambda

  4. bentoctl init it produced 3 files --> deployment_config.yaml, bentoctl.tfvars, main.tf

  • deployment_config.yaml :
  api_version: v1
  name: demo
  operator:
    name: aws-lambda
  template: terraform
  spec:
    region: us-east-2
    timeout: 10
    memory_size: 512
  • bentoctl.tfvars
# This file is maintained automatically by 
# "bentoctl generate" and "bentoctl build" commands. 
# Manual edits may be lost the next time these commands are run.

deployment_name = "demo"
region = "us-east-2"
timeout = "10"
memory_size = "512"
  • main.tf
terraform {
 required_providers {
   aws = {
     source  = "hashicorp/aws"
     version = "~> 4.0.0"
   }
 }

 required_version = "~> 1.0"
}

provider "aws" {
 region = var.region
}
and more details

6. bentoctl build -b cancer_classifier:apmmnnyq22egxjcc -f deployment_config.yaml
7. See error

Expected behavior
The build for the deployable artifacts required for this deployment shou;d go through but I encounter error as specified in the snapshot attached

terraform init

PS C:\Users\nayak\Documents\BentoML> .\terraform init

Initializing the backend...

Initializing provider plugins...

  • Reusing previous version of hashicorp/aws from the dependency lock file
  • Using previously-installed hashicorp/aws v4.0.0

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

terraform apply -var-file=bentoctl.tfvars --auto-approve
PS C:\Users\nayak\Documents\BentoML> .\terraform apply -var-file=bentoctl.tfvars --auto-approve

│ Error: Too many command line arguments

│ Expected at most one positional argument.

For more help on using this command, run:
terraform apply -help
Screenshots/Logs
bentoctl

-->

Environment:

  • OS: [Windows 10]
  • Python Version [Python 3.9.12]
  • BentoML Version [BentoML-1.0.2]
  • Bentoctl Version [bentoctl-0.3.3]

Additional context
NA

minor issues

Logger

Line 87 in registry.py has an issue with logger.log(f"Adding an operator from local file system ({content_path})..."). Seems like logger.log needs two arguments

$ bentoctl operators add heroku-deploy/
Traceback (most recent call last):
  File "/home/damir/miniconda3/envs/bentoml/bin/bentoctl", line 33, in <module>
    sys.exit(load_entry_point('bentoctl', 'console_scripts', 'bentoctl')())
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/cli/operator_management.py", line 77, in add
    operator_name = local_operator_registry.add(name)
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/operator/registry.py", line 87, in add
    logger.log(f"Adding an operator from local file system ({content_path})...")
TypeError: log() missing 1 required positional argument: 'msg'

Reading operators_list.json

Running bentoctl operators throws an error

$ bentoctl operators
OPERATOR FILE /home/damir/bentoctl/operators/operator_list.json
Traceback (most recent call last):
  File "/home/damir/miniconda3/envs/bentoml/bin/bentoctl", line 33, in <module>
    sys.exit(load_entry_point('bentoctl', 'console_scripts', 'bentoctl')())
  File "/home/damir/miniconda3/envs/bentoml/bin/bentoctl", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 167, in load
    module = import_module(match.group('module'))
  File "/home/damir/miniconda3/envs/bentoml/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/__init__.py", line 1, in <module>
    from bentoctl.operations import delete_spec as delete
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/operations.py", line 3, in <module>
    from bentoctl.deployment_spec import DeploymentSpec
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/deployment_spec.py", line 18, in <module>
    local_operator_registry = get_local_operator_registry()
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/operator/__init__.py", line 6, in get_local_operator_registry
    return OperatorRegistry(_get_bentoctl_home() / "operators")
  File "/home/damir/Git/cloud-deployment-tool/bentoctl/operator/registry.py", line 40, in __init__
    self.operator_file.read_text(encoding="utf-8")
AttributeError: 'str' object has no attribute 'read_text'

probably because self.operator_file is of type str on Line 35 in registry.py. Something like this works:

class OperatorRegistry:
    def __init__(self, path):
        self.path = Path(path)
        self.operator_file = os.path.join(self.path, "operator_list.json")
        self.operators_list = {}
        if os.path.exists(self.operator_file):
            f = open(self.operator_file)
            self.operators_list = json.load(f)

No such file or directory: when bentoctl build -b

Describe the bug
Hi, I want to deploy a bento to Azure container registry, but when I bentoctl build -b I get the following error

To Reproduce

  • bentoctl build -b sentiment_classifier:latest -f deployment_config.yaml

Expected behavior
Builds and push to container registry

Screenshots/Logs

/private/var/folders/xk/sdr1wnb91mz0csc0t9tw90nr0000gn/T/bentoctl-temp-56pjt46i
Traceback (most recent call last):
  File "/Users/bapt/anaconda3/bin/bentoctl", line 8, in <module>
    sys.exit(bentoctl())
             ^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoctl/cli/utils.py", line 92, in wrapper
    return_value = func(*args, **kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoctl/cli/utils.py", line 57, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoctl/cli/utils.py", line 26, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoctl/cli/__init__.py", line 316, in build
    generate_deployable_container(
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoctl/docker_utils.py", line 120, in generate_deployable_container
    backend.build(**buildx_args)
  File "/Users/bapt/anaconda3/lib/python3.11/site-packages/bentoml/_internal/container/base.py", line 186, in build
    return subprocess.check_output(commands, cwd=context_path, env=env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/bapt/anaconda3/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/bapt/anaconda3/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/var/folders/xk/sdr1wnb91mz0csc0t9tw90nr0000gn/T/tmpxph518_3fsTempFS/'```

-->


**Environment:**
 - OS: MacOS 13.2.1
 - Python Version 3.9.6
 - BentoML Version : 1.1.10
 - Bentoctl Version : 0.4.0

AWS Lambda deployment - service is deployed but fails to launch

Describe the bug
After model deployment service is not responsive due to error.

To Reproduce

  1. Follow steps in aws-lambda-deplyoment repository: https://github.com/bentoml/aws-lambda-deploy.
  2. Test in AWS Lambda console.

Expected behavior

Screenshots/Logs

AWS Lambda logs after testing:

{
  "errorMessage": "operation failed, [Errno 30] Read-only file system: b'/home/bentoml/bento/models/iris_clf/latest'",
  "errorType": "OperationFailed",
  "requestId": "",
  "stackTrace": [
    "  File \"/usr/local/lib/python3.10/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n",
    "  File \"<frozen importlib._bootstrap>\", line 1050, in _gcd_import\n",
    "  File \"<frozen importlib._bootstrap>\", line 1027, in _find_and_load\n",
    "  File \"<frozen importlib._bootstrap>\", line 1006, in _find_and_load_unlocked\n",
    "  File \"<frozen importlib._bootstrap>\", line 688, in _load_unlocked\n",
    "  File \"<frozen importlib._bootstrap_external>\", line 883, in exec_module\n",
    "  File \"<frozen importlib._bootstrap>\", line 241, in _call_with_frames_removed\n",
    "  File \"/home/bentoml/bento/app.py\", line 8, in <module>\n    bento_service = load(\"./\")\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/service/loader.py\", line 336, in load\n    svc = load_bento_dir(bento_path, standalone_load=standalone_load)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/service/loader.py\", line 236, in load_bento_dir\n    return _load_bento(bento, standalone_load)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/service/loader.py\", line 254, in _load_bento\n    svc = import_service(\n",
    "  File \"/usr/local/lib/python3.10/site-packages/simple_di/__init__.py\", line 139, in _\n    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/service/loader.py\", line 137, in import_service\n    module = importlib.import_module(module_name, package=working_dir)\n",
    "  File \"/usr/local/lib/python3.10/importlib/__init__.py\", line 126, in import_module\n    return _bootstrap._gcd_import(name[level:], package, level)\n",
    "  File \"<frozen importlib._bootstrap>\", line 1050, in _gcd_import\n",
    "  File \"<frozen importlib._bootstrap>\", line 1027, in _find_and_load\n",
    "  File \"<frozen importlib._bootstrap>\", line 1006, in _find_and_load_unlocked\n",
    "  File \"<frozen importlib._bootstrap>\", line 688, in _load_unlocked\n",
    "  File \"<frozen importlib._bootstrap_external>\", line 883, in exec_module\n",
    "  File \"<frozen importlib._bootstrap>\", line 241, in _call_with_frames_removed\n",
    "  File \"/home/bentoml/bento/src/service.py\", line 5, in <module>\n    iris_clf_runner = bentoml.sklearn.get(\"iris_clf:latest\").to_runner()\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/frameworks/sklearn.py\", line 50, in get\n    model = bentoml.models.get(tag_like)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/simple_di/__init__.py\", line 139, in _\n    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/models.py\", line 45, in get\n    return _model_store.get(tag)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/store.py\", line 149, in get\n    self._recreate_latest(_tag)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/bentoml/_internal/store.py\", line 132, in _recreate_latest\n    with self._fs.open(tag.latest_path(), \"w\") as latest_file:\n",
    "  File \"/usr/local/lib/python3.10/site-packages/fs/wrapfs.py\", line 472, in open\n    open_file = _fs.open(\n",
    "  File \"/usr/local/lib/python3.10/site-packages/fs/osfs.py\", line 643, in open\n    with convert_os_errors(\"open\", path):\n",
    "  File \"/usr/local/lib/python3.10/site-packages/fs/error_tools.py\", line 89, in __exit__\n    reraise(fserror, fserror(self._path, exc=exc_value), traceback)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/six.py\", line 718, in reraise\n    raise value.with_traceback(tb)\n",
    "  File \"/usr/local/lib/python3.10/site-packages/fs/osfs.py\", line 647, in open\n    return io.open(\n"
  ]
}

Environment:

  • OS: [e.g. MacOS 10.14.3]: Ubuntu 22.04.01
  • Python Version [e.g. Python 3.7.1]: 3.10.12
  • BentoML Version [e.g. BentoML-0.8.6]: 1.1.11
  • Bentoctl Version [e.g. bentoctl-0.1]: 0.4.0

Additional context

PATH in docker image is not set correctly

Hi

I am trying to use Bentoml, bentoctl and the aws-sagemaker-deploy operator to deploy a simple sklearn model. The sklearn model is tracked in a MLFlow experiment where i am able to load it and from there build a bento.

When i have build the bento, i want to use bentoctl to create a docker image that is ready to use in AWS Sagemaker, using the aws-sagemaker-deploy operator. However, i don't want to create a new ECR repository or use the terraform template for the infrastructure related to the sagemaker endpoint. Because of that, i run the bentoctl with the --dry-run flag
bentoctl build ... --dry-run
This works and my container is build successfully.
image

After it is built, i push the container to my own ECR repository. To test that the container is compatible with Sagemaker, i created the endpoint-configuration, sagemaker model and endpoint myself. However, when i create the endpoint i get an error.

image

The error is related the the PATH, so i pulled the image and started it locally. Here i saw that the /home/bento folder was indeed missing from the PATH.
image

Can you help me figure out why this is the case? In the aws-sagemaker-deploy operater, the last layer of the Docker template is ENV PATH=$BENTO_PATH:$PATH, but it does not seem to work.

AWS Sagemaker deployment - Permission denied to /home/bentoml/bentos directory

Describe the bug

To Reproduce

  1. Create model following this tutorial: https://github.com/bentoml/BentoML/tree/main/examples/quickstart
  2. Deploy model using this tutorial: https://github.com/bentoml/aws-sagemaker-deploy
  3. Watch CloudWatch of newly created endpoint

Expected behavior

Sklearn model deployed to AWS Sagemaker doesn't start due to permission denied error.

Screenshots/Logs
Service can't properly launch. Logs from Cloud Watch:

Inference server exiting
PermissionError: [Errno 13] Permission denied: '/home/bentoml/bentos'
Traceback (most recent call last):
  File "/usr/local/bin/bentoml", line 5, in <module>
    from bentoml_cli.cli import cli
  File "/usr/local/lib/python3.10/site-packages/bentoml_cli/cli.py", line 57, in <module>
    cli = create_bentoml_cli()
  File "/usr/local/lib/python3.10/site-packages/bentoml_cli/cli.py", line 42, in create_bentoml_cli
    add_bento_management_commands(bentoml_cli)
  File "/usr/local/lib/python3.10/site-packages/bentoml_cli/bentos.py", line 74, in add_bento_management_commands
    bento_store = BentoMLContainer.bento_store.get()
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 72, in get
    return self._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 124, in _provide
    value = super()._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 103, in _provide
    return inject(self._func)(
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 104, in _inject_args
    return tuple(a.get() if isinstance(a, Provider) else a for a in args)
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 104, in <genexpr>
    return tuple(a.get() if isinstance(a, Provider) else a for a in args)
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 72, in get
    return self._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 124, in _provide
    value = super()._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 103, in _provide
    return inject(self._func)(
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 104, in _inject_args
    return tuple(a.get() if isinstance(a, Provider) else a for a in args)
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 104, in <genexpr>
    return tuple(a.get() if isinstance(a, Provider) else a for a in args)
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 72, in get
    return self._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 124, in _provide
    value = super()._provide()
  File "/usr/local/lib/python3.10/site-packages/simple_di/providers.py", line 103, in _provide
    return inject(self._func)(
  File "/usr/local/lib/python3.10/site-packages/simple_di/__init__.py", line 139, in _
    return func(*_inject_args(bind.args), **_inject_kwargs(bind.kwargs))
  File "/usr/local/lib/python3.10/site-packages/bentoml/_internal/configuration/containers.py", line 196, in bentoml_home
    validate_or_create_dir(home, bentos, models, envs, tmp_bentos)
  File "/usr/local/lib/python3.10/site-packages/bentoml/_internal/utils/__init__.py", line 152, in validate_or_create_dir
    path_obj.mkdir(parents=True)
  File "/usr/local/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)

Environment:

  • OS: [e.g. MacOS 10.14.3]: Ubuntu 22.04.01
  • Python Version [e.g. Python 3.7.1]: 3.10.12
  • BentoML Version [e.g. BentoML-0.8.6]: 1.1.11
  • Bentoctl Version [e.g. bentoctl-0.1]: 0.4.0

Additional context

Remove git support for official operator

For official operators, we can use the GitHub release for versions/release.

Reasons:

  1. less git dependency
  2. reduce human errors when release a new version

We can use GitHub rest api to download the release tarfiles.

Versioning for operators

  • version:
    • use github tag
[operator.name] = {
            "path": os.path.abspath(operator.path),
            "git_url": git_url,
            "git_branch": git_branch,
            "is_local": is_local,
      "version": GIT_TAG,
        }
bentoctl operator update aws-lambda -> update to the latest tag
bentoctl operator update aws-lambda --pre -> update to the latest commit on main

Error [BentoctlDockerException]: Failed to tag Docker image, google-compute-engine-iris_classifier:6rqjqqbhbsscvnjh not found.

*Describe the bug
When I call bentoctl build as the command below to push an image to my container registry I am always getting this same error.

bentoctl build -b iris_classifier:6rqjqqbhbsscvnjh -f deployment_config.yaml
Created the repository outside-venv-test
Error [BentoctlDockerException]:  Failed to tag Docker image, google-compute-engine-iris_classifier:6rqjqqbhbsscvnjh not found.

To Reproduce

What is curios is that my teammates can run it in their computers. My machine is a Ubuntu 20.04.
I installed docker, gcloud and terraform according to those tools documentation

Follow the bentoml tutorial runnning those steps.

  1. bentoml build
  2. git clone https://github.com/bentoml/google-compute-engine-deploy.git
  3. bentoctl operator install google-compute-engine-deploy
  4. bentoctl build -b iris_classifier:6rqjqqbhbsscvnjh -f deployment_config.yaml
  5. see error

image

Environment:

  • OS: [Ubuntu 30.04]
  • Python Version [e.g. Python 3.8.10]
  • BentoML Version [e.g. BentoML-1.0.4]
  • Bentoctl Version [e.g. bentoctl-0..3.3]
  • google-compute-engine-deploy [v.1.0.2]

bentoctl build & deployment results in "NoCredentialsError"

I don't believe this is an issue with bentoctl but I was wondering if anyone ran into a similar issue or could provide some insight as to why I am getting a "NoCredentialsError".

I do believe I have setup my credentials correctly for aws cli, my "~/.aws/credentials" file is all in order and contains the correct access key ID and secret key for the root user.

Here is what I get from "aws configure list"

sean@sean-virtual-machine:~$ aws configure list
      Name                    Value             Type    Location
      ----                    -----             ----    --------
   profile                <not set>             None    None
access_key     ****************3K4C shared-credentials-file    
secret_key     ****************xr7H shared-credentials-file    
    region                eu-west-1      config-file    ~/.aws/config

And here is the error I get when I run bentoctl build -b speech_to_text_pipeline:zxhpm6voggcmit6i -f deployment_config.yaml

sean@sean-virtual-machine:~$ sudo /home/sean/Documents/PodNotes/pnenv/bin/bentoctl build -b speech_to_text_pipeline:zxhpm6voggcmit6i -f deployment_config.yaml
[sudo] password for sean: 
/home/sean/Documents/PodNotes/pnenv/bin/bentoctl:5: DeprecationWarning: bentoml._internal.utils.buildx is deprecated. Make sure to use 'bentoml.container.build' and 'bentoml.container.health' instead.
  from bentoctl.cli import bentoctl
Multiple '--platform' arguments were found. Make sure to also use '--push' to push images to a repository or generated images will not be saved. See https://docs.docker.com/engine/reference/commandline/buildx_build/#load.
[+] Building 1.4s (20/20) FINISHED                                                                                                                                                                         
 => [internal] load .dockerignore                                                                                                                                                                     0.1s
 => => transferring context: 2B                                                                                                                                                                       0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                  0.0s
 => => transferring dockerfile: 2.34kB                                                                                                                                                                0.0s
 => [internal] load metadata for docker.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04                                                                                                              1.3s
 => [ 1/15] FROM docker.io/nvidia/cuda:11.6.2-cudnn8-runtime-ubuntu20.04@sha256:42c57730e6d677799ebe09bbe007f6f21447cfda2d5a7d40f2a34e3979f4bd30                                                      0.0s
 => [internal] load build context                                                                                                                                                                     0.0s
 => => transferring context: 872B                                                                                                                                                                     0.0s
 => CACHED [ 2/15] RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache                                             0.0s
 => CACHED [ 3/15] RUN set -eux &&     apt-get update -y &&     apt-get install -q -y --no-install-recommends --allow-remove-essential         ca-certificates gnupg2 bash build-essential git ffmpe  0.0s
 => CACHED [ 4/15] RUN     set -eux &&     apt-get install -y --no-install-recommends --allow-remove-essential software-properties-common &&     add-apt-repository ppa:deadsnakes/ppa &&     apt-ge  0.0s
 => CACHED [ 5/15] RUN ln -sf /usr/bin/python3.10 /usr/bin/python3 &&     ln -sf /usr/bin/pip3.10 /usr/bin/pip3                                                                                       0.0s
 => CACHED [ 6/15] RUN curl -O https://bootstrap.pypa.io/get-pip.py &&     python3 get-pip.py &&     rm -rf get-pip.py                                                                                0.0s
 => CACHED [ 7/15] RUN groupadd -g 1034 -o bentoml && useradd -m -u 1034 -g 1034 -o -r bentoml                                                                                                        0.0s
 => CACHED [ 8/15] RUN mkdir /home/bentoml/bento && chown bentoml:bentoml /home/bentoml/bento -R                                                                                                      0.0s
 => CACHED [ 9/15] WORKDIR /home/bentoml/bento                                                                                                                                                        0.0s
 => CACHED [10/15] COPY --chown=bentoml:bentoml . ./                                                                                                                                                  0.0s
 => CACHED [11/15] RUN bash -euxo pipefail /home/bentoml/bento/env/python/install.sh                                                                                                                  0.0s
 => CACHED [12/15] RUN chmod +x /home/bentoml/bento/env/docker/setup_script                                                                                                                           0.0s
 => CACHED [13/15] RUN /home/bentoml/bento/env/docker/setup_script                                                                                                                                    0.0s
 => CACHED [14/15] RUN rm -rf /var/lib/{apt,cache,log}                                                                                                                                                0.0s
 => CACHED [15/15] RUN chmod +x /home/bentoml/bento/env/docker/entrypoint.sh                                                                                                                          0.0s
 => exporting to image                                                                                                                                                                                0.0s
 => => exporting layers                                                                                                                                                                               0.0s
 => => writing image sha256:fe0c8a590e9660aea0f829d4bace7bd17466dccc81ac87cbe462ea3f2f5ecb44                                                                                                          0.0s
 => => naming to docker.io/library/aws-ec2-speech_to_text_pipeline:zxhpm6voggcmit6i                                                                                                                   0.0s
Traceback (most recent call last):
  File "/home/sean/Documents/PodNotes/pnenv/bin/bentoctl", line 8, in <module>
    sys.exit(bentoctl())
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/cli/utils.py", line 90, in wrapper
    return_value = func(*args, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/cli/utils.py", line 55, in wrapper
    return func(*args, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/cli/utils.py", line 24, in wrapper
    return func(*args, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/cli/__init__.py", line 158, in build
    ) = deployment_config.create_repository()
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/deployment_config.py", line 217, in create_repository
    (repository_url, username, password,) = self.operator.create_repository(
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/bentoctl/operator/operator.py", line 150, in create_repository
    return operator.create_repository(repository_name, operator_spec)
  File "/root/bentoctl/operators/aws-ec2/bentoctl_aws_ec2/registry_utils.py", line 44, in create_repository
    repo_id, _ = create_ecr_repository_if_not_exists(
  File "/root/bentoctl/operators/aws-ec2/bentoctl_aws_ec2/registry_utils.py", line 30, in create_ecr_repository_if_not_exists
    result = ecr_client.describe_repositories(repositoryNames=[repository_name])
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/client.py", line 530, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/client.py", line 943, in _make_api_call
    http, parsed_response = self._make_request(
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/client.py", line 966, in _make_request
    return self._endpoint.make_request(operation_model, request_dict)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/endpoint.py", line 119, in make_request
    return self._send_request(request_dict, operation_model)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/endpoint.py", line 198, in _send_request
    request = self.create_request(request_dict, operation_model)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/endpoint.py", line 134, in create_request
    self._event_emitter.emit(
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/hooks.py", line 412, in emit
    return self._emitter.emit(aliased_event_name, **kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/hooks.py", line 256, in emit
    return self._emit(event_name, kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/hooks.py", line 239, in _emit
    response = handler(**kwargs)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/signers.py", line 105, in handler
    return self.sign(operation_name, request)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/signers.py", line 189, in sign
    auth.add_auth(request)
  File "/home/sean/Documents/PodNotes/pnenv/lib/python3.10/site-packages/botocore/auth.py", line 418, in add_auth
    raise NoCredentialsError()
botocore.exceptions.NoCredentialsError: Unable to locate credentials
sean@sean-virtual-machine:~$ 

Any help would be appreciated and apologies if this isn't the right place for this query.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.