Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions solo_server/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
from tabulate import tabulate
import json

app = typer.Typer()

@app.command()
def status():
"""Check running models and system status."""
display_hardware_info(typer)

# First check if docker is running
try:
subprocess.run(["docker", "ps"], capture_output=True, check=True)
except subprocess.CalledProcessError:
typer.echo("\n❌ Solo server not running. Please start solo-server first.")
return

# Check for running solo container
container_result = subprocess.run(["docker", "ps", "-f", "name=solo", "--format", "{{json .}}"],
capture_output=True, text=True, check=True)
Expand Down
13 changes: 12 additions & 1 deletion solo_server/commands/stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ def stop(name: str = ""):
"""
Stops the Ollama Docker container and any running models.
"""
typer.echo("🛑 Stopping Solo Server...")

# Check if docker is running
try:
subprocess.run(["docker", "info"],
check=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
except subprocess.CalledProcessError:
typer.echo("\n✅ Solo server is already stopped (Docker is not running)\n")
return

typer.echo("Stopping Solo Server...")

try:
# Stop the Docker container
Expand Down
2 changes: 1 addition & 1 deletion solo_server/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def start():
docker_run_cmd.append("ollama/ollama")

typer.echo("🚀 Starting Solo Server...")
subprocess.run(docker_run_cmd, check=True)
subprocess.run(docker_run_cmd, check=True, capture_output=True)

# Wait for container to be ready with timeout
timeout = 30
Expand Down
Loading