Documentation
¶
Overview ¶
Package docker is marked for deletion. See `service` module.
`docker` package is used to run docker containers for ML on GPU/CPU usecase.
Index ¶
- func GetLogs(ctx context.Context, contName string) (io.ReadCloser, error)
- func HandleDeployment(ctx context.Context, depReq models.DeploymentRequest) models.DeploymentResponse
- func PullImage(ctx context.Context, imageName string) error
- func RunContainer(ctx context.Context, depReq models.DeploymentRequest, ...)
- type LogAppend
- type LogbinResponse
- type NewLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLogs ¶
GetLogs return logs from the container io.ReadCloser. It's the caller duty duty to do a stdcopy.StdCopy. Any other method might render unknown unicode character as log output has both stt ctx context.Context dc *client.Client gHealthy booldout and stderr. That starting has info if that line is stderr or stdout.
func HandleDeployment ¶
func HandleDeployment(ctx context.Context, depReq models.DeploymentRequest) models.DeploymentResponse
HandleDeployment does following docker based actions in the sequence: Pull image, run container, get logs, delete container, send log to the requester
func RunContainer ¶
func RunContainer(ctx context.Context, depReq models.DeploymentRequest, createdLog LogbinResponse, resCh chan<- models.DeploymentResponse, servicePK uint, chosenGPUVendor gpuinfo.GPUVendor)
RunContainer goes through the process of setting constraints, specifying image name and cmd. It starts a container and posts log update every logUpdateDuration.