nexuscompute-sdk 2.2.2__tar.gz → 2.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/PKG-INFO +1 -1
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/cli.py +25 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/provider.py +2 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/PKG-INFO +1 -1
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/setup.py +1 -1
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/__init__.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/client.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/compute_ops.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/compute_worker_cli.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexus_sdk/docker_sandbox.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/SOURCES.txt +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/dependency_links.txt +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/entry_points.txt +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/requires.txt +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/top_level.txt +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/setup.cfg +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/tests/test_api.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/tests/test_compute_ops.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/tests/test_docker.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/tests/test_docker_edge.py +0 -0
- {nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/tests/test_version.py +0 -0
|
@@ -144,6 +144,7 @@ def provider_cli():
|
|
|
144
144
|
parser.add_argument("--token", help="Hardware node connection token")
|
|
145
145
|
parser.add_argument("--api-url", default="https://nexuscompute.net/api/v1", help="Nexus API Endpoint URL")
|
|
146
146
|
parser.add_argument("--detect", action="store_true", help="Detect system specifications and print them as JSON")
|
|
147
|
+
parser.add_argument("--daemon", action="store_true", help="Run the provider in the background as a daemon")
|
|
147
148
|
|
|
148
149
|
args = parser.parse_args()
|
|
149
150
|
|
|
@@ -156,6 +157,30 @@ def provider_cli():
|
|
|
156
157
|
parser.print_help()
|
|
157
158
|
print("\nError: --token is required to run the provider agent.", file=sys.stderr)
|
|
158
159
|
sys.exit(1)
|
|
160
|
+
if args.daemon:
|
|
161
|
+
import subprocess
|
|
162
|
+
import os
|
|
163
|
+
|
|
164
|
+
# Build the command line without --daemon
|
|
165
|
+
cmd = [sys.executable] + [arg for arg in sys.argv if arg != "--daemon"]
|
|
166
|
+
|
|
167
|
+
print("Starting provider in the background (daemon mode)...")
|
|
168
|
+
# On Windows, creationflags=subprocess.DETACHED_PROCESS or creationflags=subprocess.CREATE_NEW_PROCESS_GROUP
|
|
169
|
+
# On Unix, start_new_session=True
|
|
170
|
+
if os.name == 'nt':
|
|
171
|
+
kwargs = {'creationflags': 0x00000008} # DETACHED_PROCESS
|
|
172
|
+
else:
|
|
173
|
+
kwargs = {'start_new_session': True}
|
|
174
|
+
|
|
175
|
+
p = subprocess.Popen(
|
|
176
|
+
cmd,
|
|
177
|
+
stdout=subprocess.DEVNULL,
|
|
178
|
+
stderr=subprocess.DEVNULL,
|
|
179
|
+
stdin=subprocess.DEVNULL,
|
|
180
|
+
**kwargs
|
|
181
|
+
)
|
|
182
|
+
print(f"Daemon started with PID: {p.pid}")
|
|
183
|
+
sys.exit(0)
|
|
159
184
|
|
|
160
185
|
try:
|
|
161
186
|
agent = Provider(token=args.token, api_url=args.api_url)
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="nexuscompute-sdk",
|
|
5
|
-
version="2.2.
|
|
5
|
+
version="2.2.4",
|
|
6
6
|
description="NexusCompute Unified SDK — python client for renting compute and hosting provider nodes (API key auth)",
|
|
7
7
|
author="NexusCompute",
|
|
8
8
|
packages=find_packages(),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{nexuscompute_sdk-2.2.2 → nexuscompute_sdk-2.2.4}/nexuscompute_sdk.egg-info/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|