Run a Container
PUT/docker-svc/container
Runs a Docker container with the specified parameters.
Requires the docker-svc:container:run
permission.
Request
- application/json
Body
required
Run Container Request
HostPort is the port on the host machine that will be mapped to the container's port
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.
Envs are environment variables to set in the container
GPUEnabled specifies if GPU support is enabled
Hash is a unique identifier for the container
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
Name is the name of the container
Port is the port number that the container will expose
Responses
- 200
- 400
- 401
- 500
OK
- application/json
- Schema
- Example (from schema)
Schema
info
object
{
"info": {
"newContainerStarted": true,
"portNumber": 0
}
}
Invalid JSON
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string"
}