ContainerOptions

org.llm4s.workspace.ContainerOptions
See theContainerOptions companion object
final case class ContainerOptions

How ContainerisedWorkspace starts its container, beyond the sandbox: how long it waits for the runner, the container's resource limits, the user its runner runs as, and where its port is published (#3063, #3064).

Built with ContainerOptions() and its with* setters; new options are added with defaults.

Value parameters

connectHost

the host this client connects to; None is publishAddress, or 127.0.0.1 when that is a wildcard (0.0.0.0, ::). A remote DOCKER_HOST's own name, or host.docker.internal

cpus

the CPUs the container may use (--cpus, fractional). None is no limit

memoryBytes

the container's memory limit (docker run --memory, with --memory-swap the same, so it has no swap beyond it): the runner and every command together. At least 6 MiB, Docker's least. None, the default, is Docker's: no limit

pidsLimit

the most processes and threads the container holds at once (--pids-limit), the runner's JVM threads among them, so allow it a few hundred. None is no limit

publishAddress

the Docker host's address the runner's port is published on: 127.0.0.1, the default, so nothing beyond the Docker host can reach it (#3046). A remote DOCKER_HOST needs an address this client can reach; the token still guards every handshake, but the connection is plain ws://, so use a network you trust

runAsGroup

the gid the runner runs as; None is the workspace directory's group, or the uid's own

runAsUser

the uid the runner, and so every command, runs as. None, the default: the owner of the mounted workspace directory, so on a Linux host the files a command makes are the host user's; or, when that is root (a Docker Desktop mount, a root-owned directory), uid 1001. The runner never runs as root unless this says 0, which only rootless Docker needs (its container root is the host user). The image's entry point starts as root with only the capabilities it needs to set the container up, and drops them all before the runner starts

startupTimeout

how long ContainerisedWorkspace.start waits for the runner to accept a connection once docker run has returned, before it gives up, removes the container and reports why, with the container's logs. A first run of an image whose JVM is slow to start may need more

Attributes

Companion
object
Source
ContainerOptions.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product