gitarsenal-cli 1.7.5 → 1.7.7

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.
package/ascii_banner.txt CHANGED
@@ -1,12 +1,12 @@
1
- ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
2
-
3
- │ ██████╗ ██╗████████╗ █████╗ ██████╗ ███████╗███████╗███╗ ██╗ █████╗ ██╗ ██████╗██╗ ██╗
4
- │ ██╔════╝ ██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝████╗ ██║██╔══██╗██║ ██╔════╝██║ ██║
5
- │ ██║ ███╗██║ ██║ ███████║██████╔╝███████╗█████╗ ██╔██╗ ██║███████║██║ ██║ ██║ ██║
6
- │ ██║ ██║██║ ██║ ██╔══██║██╔══██╗╚════██║██╔══╝ ██║╚██╗██║██╔══██║██║ ██║ ██║ ██║
7
- │ ╚██████╔╝██║ ██║ ██║ ██║██║ ██║███████║███████╗██║ ╚████║██║ ██║███████╗ ╚██████╗███████╗██║ │
8
- │ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚═════╝╚══════╝╚═╝ │
9
-
10
- GPU-Accelerated Development Environments
11
-
12
- ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────╯
1
+ ╭────────────────────────────────────────────────────────────────────────────────╮
2
+
3
+ │ ██████╗ ██╗████████╗ █████╗ ██████╗ ███████╗███████╗███╗ ██╗ █████╗ ██╗ │
4
+ │ ██╔════╝ ██║╚══██╔══╝██╔══██╗██╔══██╗██╔════╝██╔════╝████╗ ██║██╔══██╗██║ │
5
+ │ ██║ ███╗██║ ██║ ███████║██████╔╝███████╗█████╗ ██╔██╗ ██║███████║██║ │
6
+ │ ██║ ██║██║ ██║ ██╔══██║██╔══██╗╚════██║██╔══╝ ██║╚██╗██║██╔══██║██║ │
7
+ │ ╚██████╔╝██║ ██║ ██║ ██║██║ ██║███████║███████╗██║ ╚████║██║ ██║███████╗│
8
+ │ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚══════╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝│
9
+
10
+ GPU-Accelerated Development Environments
11
+
12
+ ╰────────────────────────────────────────────────────────────────────────────────╯
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitarsenal-cli",
3
- "version": "1.7.5",
3
+ "version": "1.7.7",
4
4
  "description": "CLI tool for creating Modal sandboxes with GitHub repositories",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1400,15 +1400,6 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1400
1400
  modal_token = os.environ.get("MODAL_TOKEN_ID")
1401
1401
  print(f" - token in env: {'Yes' if modal_token else 'No'}")
1402
1402
  print(f" - Token length: {len(modal_token) if modal_token else 'N/A'}")
1403
-
1404
- # Verify we can create a Modal app
1405
- try:
1406
- print("🔍 Testing app creation...")
1407
- app = modal.App(app_name)
1408
- print("✅ Created app successfully")
1409
- except Exception as e:
1410
- print(f"❌ Error creating app: {e}")
1411
- return None
1412
1403
 
1413
1404
  # Create SSH-enabled image
1414
1405
  try:
@@ -1416,14 +1407,14 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1416
1407
 
1417
1408
  # Use a more stable CUDA base image and avoid problematic packages
1418
1409
  ssh_image = (
1419
- # modal.Image.from_registry("nvidia/cuda:12.4.0-runtime-ubuntu22.04", add_python="3.11")
1410
+ # modal.Image.from_registry("nvidia/cuda:12.4.0-devel-ubuntu22.04", add_python="3.11")
1420
1411
  modal.Image.debian_slim()
1421
1412
  .apt_install(
1422
1413
  "openssh-server", "sudo", "curl", "wget", "vim", "htop", "git",
1423
1414
  "python3", "python3-pip", "build-essential", "tmux", "screen", "nano",
1424
1415
  "gpg", "ca-certificates", "software-properties-common"
1425
1416
  )
1426
- .pip_install("uv", "modal", "requests", "openai") # Remove problematic CUDA packages
1417
+ .uv_pip_install("uv", "modal", "requests", "openai") # Remove problematic CUDA packages
1427
1418
  .run_commands(
1428
1419
  # Create SSH directory
1429
1420
  "mkdir -p /var/run/sshd",
@@ -1468,8 +1459,7 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1468
1459
  # Define the SSH container function (remove image from decorator)
1469
1460
  @app.function(
1470
1461
  timeout=timeout_minutes * 60, # Convert to seconds
1471
- gpu=gpu_spec['gpu'],
1472
- cpu=2,
1462
+ gpu="A10G",
1473
1463
  serialized=True,
1474
1464
  volumes=volumes_config if volumes_config else None,
1475
1465
  )
@@ -1400,15 +1400,6 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1400
1400
  modal_token = os.environ.get("MODAL_TOKEN_ID")
1401
1401
  print(f" - token in env: {'Yes' if modal_token else 'No'}")
1402
1402
  print(f" - Token length: {len(modal_token) if modal_token else 'N/A'}")
1403
-
1404
- # Verify we can create a Modal app
1405
- try:
1406
- print("🔍 Testing app creation...")
1407
- app = modal.App(app_name)
1408
- print("✅ Created app successfully")
1409
- except Exception as e:
1410
- print(f"❌ Error creating app: {e}")
1411
- return None
1412
1403
 
1413
1404
  # Create SSH-enabled image
1414
1405
  try:
@@ -1416,14 +1407,14 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1416
1407
 
1417
1408
  # Use a more stable CUDA base image and avoid problematic packages
1418
1409
  ssh_image = (
1419
- # modal.Image.from_registry("nvidia/cuda:12.4.0-runtime-ubuntu22.04", add_python="3.11")
1410
+ # modal.Image.from_registry("nvidia/cuda:12.4.0-devel-ubuntu22.04", add_python="3.11")
1420
1411
  modal.Image.debian_slim()
1421
1412
  .apt_install(
1422
1413
  "openssh-server", "sudo", "curl", "wget", "vim", "htop", "git",
1423
1414
  "python3", "python3-pip", "build-essential", "tmux", "screen", "nano",
1424
1415
  "gpg", "ca-certificates", "software-properties-common"
1425
1416
  )
1426
- .pip_install("uv", "modal", "requests", "openai") # Remove problematic CUDA packages
1417
+ .uv_pip_install("uv", "modal", "requests", "openai") # Remove problematic CUDA packages
1427
1418
  .run_commands(
1428
1419
  # Create SSH directory
1429
1420
  "mkdir -p /var/run/sshd",
@@ -1468,8 +1459,7 @@ def create_modal_ssh_container(gpu_type, repo_url=None, repo_name=None, setup_co
1468
1459
  # Define the SSH container function (remove image from decorator)
1469
1460
  @app.function(
1470
1461
  timeout=timeout_minutes * 60, # Convert to seconds
1471
- gpu=gpu_spec['gpu'],
1472
- cpu=2,
1462
+ gpu="A10G",
1473
1463
  serialized=True,
1474
1464
  volumes=volumes_config if volumes_config else None,
1475
1465
  )
@@ -1,124 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Alternative CUDA image options for GitArsenal CLI
4
- These images are more stable and less likely to cause segmentation faults
5
- """
6
-
7
- import modal
8
-
9
- def get_stable_cuda_image():
10
- """
11
- Get a stable CUDA image that's less likely to cause segmentation faults
12
- """
13
- return modal.Image.from_registry("nvidia/cuda:11.8.0-runtime-ubuntu22.04", add_python="3.11")
14
-
15
- def get_lightweight_cuda_image():
16
- """
17
- Get a lightweight CUDA image for basic GPU operations
18
- """
19
- return modal.Image.from_registry("nvidia/cuda:11.8.0-base-ubuntu22.04", add_python="3.11")
20
-
21
- def get_latest_stable_cuda_image():
22
- """
23
- Get the latest stable CUDA image (12.1 instead of 12.4)
24
- """
25
- return modal.Image.from_registry("nvidia/cuda:12.1.0-runtime-ubuntu22.04", add_python="3.11")
26
-
27
- def get_minimal_cuda_image():
28
- """
29
- Get a minimal CUDA image with just the essentials
30
- """
31
- return modal.Image.from_registry("nvidia/cuda:11.8.0-minimal-ubuntu22.04", add_python="3.11")
32
-
33
- def get_custom_cuda_image():
34
- """
35
- Create a custom CUDA image with specific optimizations
36
- """
37
- return (
38
- modal.Image.from_registry("nvidia/cuda:11.8.0-runtime-ubuntu22.04", add_python="3.11")
39
- .apt_install(
40
- "openssh-server", "sudo", "curl", "wget", "vim", "htop", "git",
41
- "python3", "python3-pip", "build-essential", "tmux", "screen", "nano",
42
- "gpg", "ca-certificates", "software-properties-common"
43
- )
44
- .pip_install("uv", "modal", "requests", "openai")
45
- .run_commands(
46
- # SSH setup
47
- "mkdir -p /var/run/sshd",
48
- "mkdir -p /root/.ssh",
49
- "chmod 700 /root/.ssh",
50
- "sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config",
51
- "sed -i 's/#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config",
52
- "sed -i 's/#PubkeyAuthentication yes/PubkeyAuthentication yes/' /etc/ssh/sshd_config",
53
- "echo 'ClientAliveInterval 60' >> /etc/ssh/sshd_config",
54
- "echo 'ClientAliveCountMax 3' >> /etc/ssh/sshd_config",
55
- "ssh-keygen -A",
56
-
57
- # GPU compatibility
58
- "echo 'export CUDA_VISIBLE_DEVICES=0' >> /root/.bashrc",
59
- "echo 'export NVIDIA_VISIBLE_DEVICES=all' >> /root/.bashrc",
60
- "echo 'export NVIDIA_DRIVER_CAPABILITIES=compute,utility' >> /root/.bashrc",
61
-
62
- # Bash prompt
63
- "echo 'export PS1=\"\\[\\e[1;32m\\]modal:\\[\\e[1;34m\\]\\w\\[\\e[0m\\]$ \"' >> /root/.bashrc",
64
- )
65
- )
66
-
67
- # Image selection based on use case
68
- CUDA_IMAGE_OPTIONS = {
69
- "stable": get_stable_cuda_image,
70
- "lightweight": get_lightweight_cuda_image,
71
- "latest": get_latest_stable_cuda_image,
72
- "minimal": get_minimal_cuda_image,
73
- "custom": get_custom_cuda_image,
74
- "default": lambda: modal.Image.debian_slim() # No CUDA, most stable
75
- }
76
-
77
- def get_cuda_image(option="default"):
78
- """
79
- Get a CUDA image based on the specified option
80
-
81
- Args:
82
- option (str): One of "stable", "lightweight", "latest", "minimal", "custom", "default"
83
-
84
- Returns:
85
- modal.Image: The selected CUDA image
86
- """
87
- if option not in CUDA_IMAGE_OPTIONS:
88
- print(f"⚠️ Unknown CUDA image option: {option}. Using default.")
89
- option = "default"
90
-
91
- return CUDA_IMAGE_OPTIONS[option]()
92
-
93
- def test_cuda_image_stability(image_func, name):
94
- """
95
- Test the stability of a CUDA image
96
-
97
- Args:
98
- image_func: Function that returns a modal.Image
99
- name (str): Name of the image for logging
100
-
101
- Returns:
102
- bool: True if image builds successfully
103
- """
104
- try:
105
- print(f"🧪 Testing {name} CUDA image...")
106
- image = image_func()
107
- print(f"✅ {name} image created successfully")
108
- return True
109
- except Exception as e:
110
- print(f"❌ {name} image failed: {e}")
111
- return False
112
-
113
- if __name__ == "__main__":
114
- print("🧪 Testing CUDA image stability...")
115
-
116
- for name, image_func in CUDA_IMAGE_OPTIONS.items():
117
- test_cuda_image_stability(image_func, name)
118
-
119
- print("\n📋 CUDA Image Recommendations:")
120
- print("• For maximum stability: Use 'default' (no CUDA)")
121
- print("• For basic GPU operations: Use 'stable' (CUDA 11.8 runtime)")
122
- print("• For minimal GPU support: Use 'minimal' (CUDA 11.8 minimal)")
123
- print("• For latest features: Use 'latest' (CUDA 12.1 runtime)")
124
- print("• For custom setup: Use 'custom' (CUDA 11.8 with SSH)")