From 21bcc67804518a53dcd9e8cb528d666117589682 Mon Sep 17 00:00:00 2001 From: ddiddi Date: Thu, 30 Jan 2025 08:48:48 -0800 Subject: [PATCH] fix: update pip deploy with status --- setup.py | 27 +++------------------------ solo_server/cli.py | 7 +++---- solo_server/commands/serve.py | 6 +++--- solo_server/commands/status.py | 4 ++-- 4 files changed, 11 insertions(+), 33 deletions(-) diff --git a/setup.py b/setup.py index 6ffc9cb..3c66570 100644 --- a/setup.py +++ b/setup.py @@ -5,36 +5,15 @@ setup( name="solo-server", - version="0.3.4", + version="0.3.5", author="Dhruv Diddi", author_email="dhruv.diddi@gmail.com", - description="Powering Physical AI.", + description="AIOps for the Physical World.", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/AIEngineersDev/solo-server", - packages=find_packages(), + packages=find_packages(include=["solo_server", "solo_server.*"]), include_package_data=True, - package_data={ - 'solo_server': [ - 'templates/*.py', - 'gui.py', - 'grafana_setup.sh', - 'locustfile.py', - 'Dockerfile', - 'docker-compose.yml', - 'docker-compose-benchmark.yml', - 'requirements.txt', - 'utils.py', - 'base.py', - ], - }, - data_files=[ - ('solo_server', [ - 'solo_server/Dockerfile', - 'solo_server/docker-compose.yml', - 'solo_server/requirements.txt' - ]), - ], install_requires=[ "typer", ], diff --git a/solo_server/cli.py b/solo_server/cli.py index 6f4e8c0..0d99c03 100644 --- a/solo_server/cli.py +++ b/solo_server/cli.py @@ -1,7 +1,6 @@ import typer -from solo.setup import interactive_setup -from solo.commands import pull, serve, stop, status, benchmark - +from .commands import pull, serve, stop, status, benchmark +from .setup import interactive_setup app = typer.Typer() # Commands @@ -10,7 +9,7 @@ app.command()(stop.stop) app.command()(status.status) app.command()(benchmark.benchmark) -app.command(name="setup")(interactive_setup) +app.command()(interactive_setup) if __name__ == "__main__": app() diff --git a/solo_server/commands/serve.py b/solo_server/commands/serve.py index 298df23..c669dcc 100644 --- a/solo_server/commands/serve.py +++ b/solo_server/commands/serve.py @@ -5,14 +5,14 @@ def serve(name: str, model: str): """ Serves a model using Ramalama. """ - typer.echo(f"🚀 Starting model {model} as {name} with Ramalama...") + typer.echo(f"🚀 Starting model {model} as {name}...") try: - command = ["ramalama", "serve", "--name", name, model] + command = ["ramalama", "serve", model] process = subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) typer.echo(f"✅ Model {model} is now running as {name}.") - typer.echo(f"🌐 Access the UI at: http://127.0.0.1:8080") + typer.echo(f"🌐 Access the UI at: http://127.0.0.1:5070") except subprocess.CalledProcessError as e: typer.echo(f"❌ Failed to serve model {model}: {e.stderr}", err=True) diff --git a/solo_server/commands/status.py b/solo_server/commands/status.py index c7561cc..f5a8512 100644 --- a/solo_server/commands/status.py +++ b/solo_server/commands/status.py @@ -4,7 +4,7 @@ app = typer.Typer() @app.command() -def check(): +def status(): """Check running models.""" typer.echo("Checking running model containers...") - subprocess.run(["docker", "ps", "--filter", "name=solo-container"], check=True) + subprocess.run(["podman", "ps", "--filter", "name=solo-container"], check=True)