-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathup.py
More file actions
35 lines (27 loc) · 1.02 KB
/
up.py
File metadata and controls
35 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import click
from radicalbit_ai_monitoring.services.docker import DockerUtil
from radicalbit_ai_monitoring.services.fs import FSUtil
from pathlib import Path
import sys
@click.command(help="Install the radicalbit-ai-monitoring")
@click.option(
"--dir",
"-d",
default=f"{Path.home()}/rbit-ai-monitoring",
help="Path of the installation",
show_default=True,
)
def up(dir: str):
"""Run the radicalbit-ai-monitoring platform"""
if not FSUtil.installed(dir):
click.echo("Radicalbit-ai-monitoring is not installed")
click.echo("Run 'radicalbit-ai-monitoring install --help' for more info")
sys.exit(1)
click.echo("Starting radicalbit-ai-monitoring...")
docker = DockerUtil(dir)
versions = FSUtil.get_versions(dir)
pull = docker.need_pull(versions)
docker.run_app(pull)
click.echo("Radicalbit-ai-monitoring started successfully")
# TODO: make the port configurable and update the docker-compose file
click.echo("You can access it at http://127.0.0.1:5173")