mirror of https://github.com/kortix-ai/suna.git
chore(config): refactor sandbox image constants into common config
This commit is contained in:
parent
fdd9181292
commit
22016b4cc5
|
@ -3,6 +3,7 @@ from daytona_api_client.models.workspace_state import WorkspaceState
|
|||
from dotenv import load_dotenv
|
||||
from utils.logger import logger
|
||||
from utils.config import config
|
||||
from utils.config import Configuration
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
@ -91,7 +92,7 @@ def create_sandbox(password: str, project_id: str = None):
|
|||
labels = {'id': project_id}
|
||||
|
||||
params = CreateSandboxParams(
|
||||
image="kortix/suna:0.1.2",
|
||||
image=Configuration.SANDBOX_IMAGE_NAME,
|
||||
public=True,
|
||||
labels=labels,
|
||||
env_vars={
|
||||
|
|
|
@ -158,6 +158,10 @@ class Configuration:
|
|||
STRIPE_PRODUCT_ID_PROD: str = 'prod_SCl7AQ2C8kK1CD' # Production product ID
|
||||
STRIPE_PRODUCT_ID_STAGING: str = 'prod_SCgIj3G7yPOAWY' # Staging product ID
|
||||
|
||||
# Sandbox configuration
|
||||
SANDBOX_IMAGE_NAME = "kortix/suna:0.1.2"
|
||||
SANDBOX_ENTRYPOINT = "/usr/bin/supervisord -n -c /etc/supervisor/conf.d/supervisord.conf"
|
||||
|
||||
@property
|
||||
def STRIPE_PRODUCT_ID(self) -> str:
|
||||
if self.ENV_MODE == EnvMode.STAGING:
|
||||
|
|
13
setup.py
13
setup.py
|
@ -1,19 +1,12 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import shutil
|
||||
import platform
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
import urllib.request
|
||||
import configparser
|
||||
from getpass import getpass
|
||||
import re
|
||||
import socket
|
||||
import random
|
||||
import string
|
||||
from backend.utils.config import Configuration
|
||||
|
||||
# ANSI colors for pretty output
|
||||
class Colors:
|
||||
|
@ -201,8 +194,8 @@ def collect_daytona_info():
|
|||
print_info("Then, generate an API key from 'Keys' menu")
|
||||
print_info("After that, go to Images (https://app.daytona.io/dashboard/images)")
|
||||
print_info("Click '+ Create Image'")
|
||||
print_info("Enter 'kortix/suna:0.1.2' as the image name")
|
||||
print_info("Set '/usr/bin/supervisord -n -c /etc/supervisor/conf.d/supervisord.conf' as the Entrypoint")
|
||||
print_info(f"Enter '{Configuration.SANDBOX_IMAGE_NAME}' as the image name")
|
||||
print_info(f"Set '{Configuration.SANDBOX_ENTRYPOINT}' as the Entrypoint")
|
||||
|
||||
input("Press Enter to continue once you've completed these steps...")
|
||||
|
||||
|
|
Loading…
Reference in New Issue