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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# centml-python-client
# CCluster Python Client
![](https://github.com/CentML/centml-python-client/actions/workflows/unit_tests.yml/badge.svg)

### Installation
Expand Down
8 changes: 4 additions & 4 deletions centml/cli/login.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def do_GET(self):
self.wfile.write("""
<html>
<body>
<h1>Succesfully logged into CentML CLI</h1>
<h1>Successfully logged into CCluster CLI</h1>
<p>You can now close this tab and continue in the CLI.</p>
</body>
</html>
Expand Down Expand Up @@ -84,7 +84,7 @@ def exchange_code_for_token(code, code_verifier):
return response.json()


@click.command(help="Login to CentML")
@click.command(help="Login to CCluster")
@click.argument("token_file", required=False)
def login(token_file):
if token_file:
Expand All @@ -95,7 +95,7 @@ def login(token_file):
click.echo("Authenticating with stored credentials...\n")
click.echo("✅ Login successful")
else:
click.echo("Logging into CentML...")
click.echo("Logging into CCluster...")

choice = click.confirm("Do you want to log in with your browser now?", default=True)
if choice:
Expand Down Expand Up @@ -128,7 +128,7 @@ def login(token_file):
click.echo("Login unsuccessful")


@click.command(help="Logout from CentML")
@click.command(help="Logout from CCluster")
def logout():
auth.remove_centml_cred()
click.echo("Logout successful")
36 changes: 20 additions & 16 deletions centml/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,29 @@
from centml.cli.cluster import ls, get, delete, pause, resume, capacity
from centml.cli.shell import shell, exec_cmd


@click.group()
# this is the version and prog name set in setup.py
@click.version_option(
prog_name="CentML CLI",
message="""
______ __ __ ___ __
/ ____/___ ____ / /_ / |/ // /
/ / / _ \\ / __ \\ / __// /|_/ // /
/ /___ / __// / / // /_ / / / // /___
\\____/ \\___//_/ /_/ \\__//_/ /_//_____/

# NVIDIA green (#76B900)
_NVIDIA_GREEN = (118, 185, 0)

_BANNER = r"""
______________ __
/ ____/ ____/ /_ _______/ /____ _____
/ / / / / / / / / ___/ __/ _ \/ ___/
/ /___/ /___/ / /_/ (__ ) /_/ __/ /
\____/\____/_/\__,_/____/\__/\___/_/
"""

_VERSION_MESSAGE = click.style(_BANNER, fg=_NVIDIA_GREEN) + """
🚀 Welcome to %(prog)s v%(version)s 🚀

✨ AI Deployment Made Simple ✨
📚 Documentation: https://docs.centml.ai/
🛠 Need help? Reach out to support@centml.ai
""",
)
📚 Documentation: https://docs.nvidia.com/ccluster
💬 Need help? Reach out on GitHub: https://github.com/NVIDIA/ccluster
"""


@click.group()
# this is the version and prog name set in setup.py
@click.version_option(prog_name="CCluster CLI", message=_VERSION_MESSAGE)
def cli():
pass

Expand Down
2 changes: 1 addition & 1 deletion centml/sdk/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_centml_token():
# Fall back to stored credentials for interactive flows
cred = load_centml_cred()
if not cred:
sys.exit("CentML credentials not found. Please login...")
sys.exit("CCluster credentials not found. Please login...")
exp_time = int(jwt.decode(cred["access_token"], options={"verify_signature": False})["exp"])

if time.time() >= exp_time - 100:
Expand Down
Loading