Documentation
¶
Index ¶
Constants ¶
const ( // RocrVisibleDevices define the ROCm resources allocated by Slurm. RocrVisibleDevices = "ROCR_VISIBLE_DEVICES" // CudaVisibleDevices define the CUDA resources allocated by Slurm. CudaVisibleDevices = "CUDA_VISIBLE_DEVICES" )
const (
DockerContainerRuntime = "docker"
)
Available container runtimes.
Variables ¶
var DefaultFluentOptions = FluentOptions{
ContainerName: "",
Port: 0,
Image: "",
}
DefaultFluentOptions stores defaults for Agent FluentBit options, deprecated.
Functions ¶
func VisibleGPUsFromEnvironment ¶
func VisibleGPUsFromEnvironment() (visDevices string)
VisibleGPUsFromEnvironment returns GPU visibility information from the environment if any, else "".
Types ¶
type ContainerRuntime ¶
type ContainerRuntime string
ContainerRuntime configures which container runtime to use.
type FluentOptions ¶
type FluentOptions struct { Image string `json:"image"` Port int `json:"port"` ContainerName string `json:"container_name"` }
FluentOptions stores configurable Fluent Bit-related options, deprecated no longer in use.
type HooksOptions ¶
type HooksOptions struct {
OnConnectionLost []string `json:"on_connection_lost"`
}
HooksOptions contains external commands to be run when specific things happen.
type Options ¶
type Options struct { ConfigFile string `json:"config_file"` Log logger.Config `json:"log"` MasterHost string `json:"master_host"` MasterPort int `json:"master_port"` AgentID string `json:"agent_id"` // Label has been deprecated; we now use ResourcePool to classify the agent. ResourcePool string `json:"resource_pool"` ContainerMasterHost string `json:"container_master_host"` ContainerMasterPort int `json:"container_master_port"` SlotType string `json:"slot_type"` VisibleGPUs string `json:"visible_gpus"` Security SecurityOptions `json:"security"` Debug bool `json:"debug"` ArtificialSlots int `json:"artificial_slots"` TLS bool `json:"tls"` TLSCertFile string `json:"tls_cert"` TLSKeyFile string `json:"tls_key"` APIEnabled bool `json:"api_enabled"` BindIP string `json:"bind_ip"` BindPort int `json:"bind_port"` HTTPProxy string `json:"http_proxy"` HTTPSProxy string `json:"https_proxy"` FTPProxy string `json:"ftp_proxy"` NoProxy string `json:"no_proxy"` AgentReconnectAttempts int `json:"agent_reconnect_attempts"` // TODO(ilia): switch this to better parsing with `model.Duration` similar to // master config. AgentReconnectBackoff int `json:"agent_reconnect_backoff"` ContainerRuntime string `json:"container_runtime"` ContainerAutoRemoveDisabled bool `json:"container_auto_remove_disabled"` Hooks HooksOptions `json:"hooks"` // The Fluent docker image to use, deprecated. Fluent FluentOptions `json:"fluent"` }
Options stores all the configurable options for the Determined agent.
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions returns the default configurable options for the Determined agent.
func (Options) Deprecations ¶
Deprecations describe fields which were recently or will soon be removed.
func (*Options) Resolve ¶
func (o *Options) Resolve()
Resolve fully resolves the agent configuration, handling dynamic defaults.
func (*Options) SetAgentID ¶
SetAgentID resolves the name (or ID) of the agent.
type SecurityOptions ¶
type SecurityOptions struct {
TLS TLSOptions `json:"tls"`
}
SecurityOptions stores configurable security-related options.
type TLSOptions ¶
type TLSOptions struct { Enabled bool `json:"enabled"` SkipVerify bool `json:"skip_verify"` MasterCert string `json:"master_cert"` MasterCertName string `json:"master_cert_name"` ClientCert string `json:"client_cert"` ClientKey string `json:"client_key"` }
TLSOptions is the TLS connection configuration for the agent.
func (TLSOptions) ReadClientCertificate ¶
func (t TLSOptions) ReadClientCertificate() (*tls.Certificate, error)
ReadClientCertificate returns the client certificate described by this configuration (nil if it does not allow TLS to be enabled).
func (TLSOptions) Validate ¶
func (t TLSOptions) Validate() []error
Validate implements the check.Validatable interface.