fix: increase disk space to 128GB and update OLLAMA_MODEL and MIN_VRAM_MB for improved performance
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
"gpu_ram": {"gt": 50000},
|
||||
"reliability": {"gt": ".99"},
|
||||
"inet_down": {"gt": 500},
|
||||
"disk_space": {"gt": 70},
|
||||
"disk_space": {"gt": 200},
|
||||
"order": [
|
||||
[
|
||||
"price",
|
||||
|
||||
@@ -17,10 +17,10 @@ import requests
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration
|
||||
# -----------------------------------------------------------------------------
|
||||
OLLAMA_MODEL = "qwen3-coder-next:latest"
|
||||
MIN_VRAM_MB = 20000
|
||||
OLLAMA_MODEL = "deepseek-v4-flash:cloud"
|
||||
MIN_VRAM_MB = 30000
|
||||
MAX_BID_HOURLY = 1.5
|
||||
DISK_SPACE_GB = int(MIN_VRAM_MB / 700 + 20)
|
||||
DISK_SPACE_GB = int(MIN_VRAM_MB * 2 / 700 + 20)
|
||||
|
||||
VAST_API_BASE = "https://console.vast.ai/api/v0"
|
||||
|
||||
@@ -55,7 +55,8 @@ def vast_request(method: str, endpoint: str, params: Dict = None, json_data: Dic
|
||||
url = f"{VAST_API_BASE}/{endpoint}"
|
||||
headers = {"Authorization": f"Bearer {API_KEY}"}
|
||||
|
||||
print(f"[{method}] {url}")
|
||||
|
||||
#print(f"[{method}] {url}")
|
||||
response = requests.request(method, url, headers=headers, params=params, json=json_data)
|
||||
|
||||
if not response.ok:
|
||||
@@ -169,18 +170,27 @@ def wait_until_ready(instance_id: int, poll_interval: int = 15) -> Dict[str, Any
|
||||
if tag in data and data[tag] is not None:
|
||||
info.append(f"{tag}={data[tag]}")
|
||||
|
||||
print(f"Status: {status} | {' | '.join(info)}")
|
||||
#print(f"Status: {status} | {' | '.join(info)}")
|
||||
|
||||
if status == "running":
|
||||
# Extra check to ensure SSH port is populated
|
||||
if data.get("ssh_port") and data.get("ssh_host"):
|
||||
print("Instance is running and network is configured.")
|
||||
time.sleep(5) # Brief pause to ensure services are up
|
||||
return data
|
||||
else:
|
||||
print("Instance running, but waiting for SSH details to populate...")
|
||||
print("Instance not ready yet. Fetching logs for insights...")
|
||||
#print("Instance not ready yet. Fetching logs for insights...")
|
||||
try:
|
||||
logs = get_instance_demon_logs(instance_id)
|
||||
print(chr(27) + "[2J")
|
||||
print(f"--- Logs for Instance {instance_id} ---")
|
||||
print(f"Status: {status} | {' | '.join(info)}")
|
||||
#print("instanxce_details:"+json.dumps(data))
|
||||
#print(f"Current Status: {status}")
|
||||
print(f"Status MSG: {data['status_msg']}")
|
||||
print(f"instance_id: {instance_id}")
|
||||
print(f"Date: {time.strftime('%Y-%m-%d %H:%M:%S')}\n\n")
|
||||
print("Retrieved logs:")
|
||||
print('\n'.join(logs.splitlines()[-30:])) # Print last 10 lines for brevity
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user