modal
    Preparing search index...

    Type Alias SandboxCreateOptions

    Options for App.createSandbox().

    type SandboxCreateOptions = {
        blockNetwork?: boolean;
        cidrAllowlist?: string[];
        cloud?: string;
        cloudBucketMounts?: Record<string, CloudBucketMount>;
        command?: string[];
        cpu?: number;
        encryptedPorts?: number[];
        gpu?: string;
        h2Ports?: number[];
        memory?: number;
        name?: string;
        proxy?: Proxy;
        regions?: string[];
        secrets?: Secret[];
        timeout?: number;
        unencryptedPorts?: number[];
        verbose?: boolean;
        volumes?: Record<string, Volume>;
        workdir?: string;
    }
    Index

    Properties

    blockNetwork?: boolean

    Whether to block all network access from the Sandbox.

    cidrAllowlist?: string[]

    List of CIDRs the Sandbox is allowed to access. If None, all CIDRs are allowed. Cannot be used with blockNetwork.

    cloud?: string

    Cloud provider to run the Sandbox on.

    cloudBucketMounts?: Record<string, CloudBucketMount>

    Mount points for cloud buckets.

    command?: string[]

    Sequence of program arguments for the main process. Default behavior is to sleep indefinitely until timeout or termination.

    cpu?: number

    Reservation of physical CPU cores for the Sandbox, can be fractional.

    encryptedPorts?: number[]

    List of ports to tunnel into the Sandbox. Encrypted ports are tunneled with TLS.

    gpu?: string

    GPU reservation for the Sandbox (e.g. "A100", "T4:2", "A100-80GB:4").

    h2Ports?: number[]

    List of encrypted ports to tunnel into the Sandbox, using HTTP/2.

    memory?: number

    Reservation of memory in MiB.

    name?: string

    Optional name for the Sandbox. Unique within an App.

    proxy?: Proxy

    Reference to a Modal Proxy to use in front of this Sandbox.

    regions?: string[]

    Region(s) to run the Sandbox on.

    secrets?: Secret[]

    Secrets to inject into the Sandbox.

    timeout?: number

    Timeout of the Sandbox container, defaults to 10 minutes.

    unencryptedPorts?: number[]

    List of ports to tunnel into the Sandbox without encryption.

    verbose?: boolean

    Enable verbose logging.

    volumes?: Record<string, Volume>

    Mount points for Modal Volumes.

    workdir?: string

    Working directory of the Sandbox.