Documentation ¶
Index ¶
- func BuildJobImage(ctx context.Context, jobID, builder string, fqdnToPush bool) (*string, error)
- func BuildSingularityImage(jobID, authConfig, builder string) (*string, error)
- func ContainerAttrs(labels map[string]string) (string, int64, int64, time.Time)
- func ConvertNotebook(ctx context.Context, image, ipynb, to, workdir string, mounts []mount.Mount) error
- func ConvertToSingularityImage(id, name string) (*string, error)
- func DeleteImage(ctx context.Context, imageName string) error
- func DetectImageWorkDir(ctx context.Context, image string) string
- func DeviceCount(ctx context.Context) (*int64, error)
- func LogsOfDockerContainer(ctx context.Context, cli *docker.Client, id string) (*string, error)
- func NvididSMI(ctx context.Context, args []string) (*string, error)
- func PushJobImage(ctx context.Context, imageName, authConfig string) error
- func PyVersion(ctx context.Context, image, python string) string
- func RunAndWaitDockerContainer(ctx context.Context, name string, config *container.Config, ...) (*string, error)
- func RunJupyterNotebook(ctx context.Context, originalImage, wrappedImage, workdirHost, workdir string) (*string, error)
- func RunningNotebooks(ctx context.Context, cli *docker.Client) ([]types.Container, error)
- func WrapWithJupyterNotebook(ctx context.Context, id, image, builder string) (*string, error)
- type HarborProject
- type HarborRepository
- type HarborSerchResult
- type IPython
- type PackageManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildJobImage ¶
BuildJobImage builds a docker image for the job
func BuildSingularityImage ¶
BuildSingularityImage builds singularity image
func ContainerAttrs ¶
ContainerAttrs returns original image, published port & started time
func ConvertNotebook ¶
func ConvertNotebook(ctx context.Context, image, ipynb, to, workdir string, mounts []mount.Mount) error
ConvertNotebook converts Jupyter notebook to Python scripts
func ConvertToSingularityImage ¶
ConvertToSingularityImage converts a docker image to a singularity image
func DeleteImage ¶
DeleteImage deletes a docker image
func DetectImageWorkDir ¶
DetectImageWorkDir detects image working directory
func DeviceCount ¶
DeviceCount returns number of NVIDIA GPUS
func LogsOfDockerContainer ¶
LogsOfDockerContainer retrieves logs from a specified container
func PushJobImage ¶
PushJobImage pushes a docker image for the job
func RunAndWaitDockerContainer ¶
func RunAndWaitDockerContainer(ctx context.Context, name string, config *container.Config, host *container.HostConfig, net *network.NetworkingConfig) (*string, error)
RunAndWaitDockerContainer run containers and wait for its stopping
func RunJupyterNotebook ¶
func RunJupyterNotebook(ctx context.Context, originalImage, wrappedImage, workdirHost, workdir string) (*string, error)
RunJupyterNotebook runs the specified image as a jupter notebook
func RunningNotebooks ¶
RunningNotebooks returns containers which was build by this app
Types ¶
type HarborProject ¶
HarborProject defines the repo information
type HarborRepository ¶
type HarborRepository struct { ProjectID int64 `json:"project_id"` ProjectName string `json:"project_name"` Public bool `json:"project_public"` Name string `json:"repository_name"` Tags int64 `json:"tags_count"` }
HarborRepository defines the repo information
func HarborRepositories ¶
func HarborRepositories(ctx context.Context, auth types.AuthConfig) ([]*HarborRepository, error)
HarborRepositories returns harbor repos
type HarborSerchResult ¶
type HarborSerchResult struct { Projects []*HarborProject `json:"project"` Repositories []*HarborRepository `json:"repository"` }
HarborSerchResult defines the response of /api/search
type IPython ¶
type IPython struct { Meta struct { KernelSpec struct { Name string `json:"name"` Lang string `json:"language"` } `json:"kernelspec"` Lang struct { Name string `json:"name"` FileExt string `json:"file_extension"` } `json:"language_info"` } `json:"metadata"` }
IPython defines a notebook
type PackageManager ¶
type PackageManager int
PackageManager like apt / yum
const ( Unknown PackageManager = iota Apk Apt Yum )
PackageManager values