unitlab 2.3.41__tar.gz → 2.3.42__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitlab
3
- Version: 2.3.41
3
+ Version: 2.3.42
4
4
  Home-page: https://github.com/teamunitlab/unitlab-sdk
5
5
  Author: Unitlab Inc.
6
6
  Author-email: team@unitlab.ai
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name="unitlab",
5
- version="2.3.41",
5
+ version="2.3.42",
6
6
  license="MIT",
7
7
  author="Unitlab Inc.",
8
8
  author_email="team@unitlab.ai",
@@ -122,7 +122,7 @@ def dataset_download(
122
122
  def run_agent(
123
123
  api_key: API_KEY,
124
124
  device_id: Annotated[str, typer.Option(help="Device ID")] = None,
125
- base_domain: Annotated[str, typer.Option(help="Base domain for tunnels")] = "1scan.uz",
125
+ base_domain: Annotated[str, typer.Option(help="Base domain for tunnels")] = "api-dev.unitlab.ai",
126
126
 
127
127
  ):
128
128
 
@@ -38,7 +38,7 @@ class PersistentTunnel:
38
38
 
39
39
  # Clean device ID for subdomain
40
40
  if device_id:
41
- self.device_id = device_id.replace('-', '').replace('_', '').replace('.', '').lower()[:20]
41
+ self.device_id = device_id.replace('_', '').replace('.', '').lower()[:30]
42
42
  else:
43
43
  import uuid
44
44
  self.device_id = str(uuid.uuid4())[:8]
@@ -151,26 +151,26 @@ class PersistentTunnel:
151
151
  return False
152
152
 
153
153
  # First, check if SSH DNS record exists and delete it
154
- print("🔍 Checking for existing SSH DNS record: {}.{}".format(self.ssh_subdomain, self.domain))
155
- list_url = "{}?name={}.{}".format(url, self.ssh_subdomain, self.domain)
156
- list_response = requests.get(list_url, headers=headers)
157
-
158
- if list_response.status_code == 200:
159
- records = list_response.json().get("result", [])
160
- print("Found {} existing DNS records".format(len(records)))
161
- print('this is new version')
162
- for record in records:
163
- if record["name"] == "{}.{}".format(self.ssh_subdomain, self.domain):
164
- record_id = record["id"]
165
- print("🗑️ Deleting old SSH DNS record: {}".format(record_id))
166
- delete_url = "{}/{}".format(url, record_id)
167
- delete_response = requests.delete(delete_url, headers=headers)
168
- if delete_response.status_code in [200, 204]:
169
- print("✅ Deleted old SSH DNS record")
170
- else:
171
- print("⚠️ Could not delete old SSH DNS record: {}".format(delete_response.text[:200]))
172
- else:
173
- print("⚠️ Could not list DNS records: {}".format(list_response.text[:200]))
154
+ # print("🔍 Checking for existing SSH DNS record: {}.{}".format(self.ssh_subdomain, self.domain))
155
+ # list_url = "{}?name={}.{}".format(url, self.ssh_subdomain, self.domain)
156
+ # list_response = requests.get(list_url, headers=headers)
157
+
158
+ # if list_response.status_code == 200:
159
+ # records = list_response.json().get("result", [])
160
+ # print("Found {} existing DNS records".format(len(records)))
161
+ # print('this is new version')
162
+ # for record in records:
163
+ # if record["name"] == "{}.{}".format(self.ssh_subdomain, self.domain):
164
+ # record_id = record["id"]
165
+ # print("🗑️ Deleting old SSH DNS record: {}".format(record_id))
166
+ # delete_url = "{}/{}".format(url, record_id)
167
+ # delete_response = requests.delete(delete_url, headers=headers)
168
+ # if delete_response.status_code in [200, 204]:
169
+ # print("✅ Deleted old SSH DNS record")
170
+ # else:
171
+ # print("⚠️ Could not delete old SSH DNS record: {}".format(delete_response.text[:200]))
172
+ # else:
173
+ # print("⚠️ Could not list DNS records: {}".format(list_response.text[:200]))
174
174
 
175
175
  # Wait a moment for DNS deletion to propagate
176
176
  time.sleep(2)
@@ -263,15 +263,20 @@ class PersistentTunnel:
263
263
  f.write("credentials-file: {}\n\n".format(cred_file))
264
264
  f.write("ingress:\n")
265
265
 
266
- # SSH service on dedicated subdomain (s{deviceid}.unitlab-ai.com)
266
+ # SSH service on dedicated subdomain (s{deviceid}.unitlab-ai.com)
267
267
  f.write(" - hostname: {}.{}\n".format(self.ssh_subdomain, self.domain))
268
268
  f.write(" service: ssh://localhost:22\n")
269
269
 
270
+
271
+
272
+
270
273
  # API (more specific path goes first)
271
274
  f.write(" - hostname: {}.{}\n".format(self.subdomain, self.domain))
272
275
  f.write(" path: /api-agent/*\n")
273
276
  f.write(" service: http://localhost:8001\n")
274
277
 
278
+
279
+
275
280
  # Jupyter (general hostname for HTTP)
276
281
  f.write(" - hostname: {}.{}\n".format(self.subdomain, self.domain))
277
282
  f.write(" service: http://localhost:8888\n")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unitlab
3
- Version: 2.3.41
3
+ Version: 2.3.42
4
4
  Home-page: https://github.com/teamunitlab/unitlab-sdk
5
5
  Author: Unitlab Inc.
6
6
  Author-email: team@unitlab.ai
File without changes
File without changes
File without changes
File without changes
File without changes