Skip to main content

Launch a Container

PUT 

/docker-svc/container

Launches a Docker container with the specified parameters.

Requires the docker-svc:docker:create permission.

Request

Body

required

Launch Container Request

    hostPort integer

    HostPort is the port on the host machine that will be mapped to the container's port

    image stringrequired

    Image is the Docker image to use for the container

    options

    object

    assets

    object

    Assets maps environment variable names to file URLs. Example: {"MODEL": "https://huggingface.co/TheBloke/Mistral-7B-Instruct-v0.2-GGUF/resolve/main/mistral-7b-instruct-v0.2.Q2_K.gguf"\} These files are downloaded by the Download Svc and mounted in the container. The environment variable MODEL will point to the local file path in the container.

    property name* string
    envs string[]

    Envs are environment variables to set in the container

    gpuEnabled boolean

    GPUEnabled specifies if GPU support is enabled

    hash string

    Hash is a unique identifier for the container

    keeps string[]

    Keeps are paths that persist across container restarts. They function like mounts or volumes, but their external storage location is irrelevant.

    labels

    object

    Labels are metadata labels associated with the container

    property name* string
    name string

    Name is the name of the container

    port integerrequired

    Port is the port number that the container will expose

Responses

OK

Schema

    info

    object

    newContainerStarted boolean
    portNumber integer
Loading...