projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
20602: Attach assigned priority to response log entry.
[arvados.git]
/
lib
/
crunchrun
/
executor.go
diff --git
a/lib/crunchrun/executor.go
b/lib/crunchrun/executor.go
index 05e9adefe3adc62c0bfb25504e4f0486ba5ae5b2..6ec5b838f681fe3c03a778f966c58979763f9031 100644
(file)
--- a/
lib/crunchrun/executor.go
+++ b/
lib/crunchrun/executor.go
@@
-4,10
+4,10
@@
package crunchrun
import (
package crunchrun
import (
+ "context"
"io"
"git.arvados.org/arvados.git/sdk/go/arvados"
"io"
"git.arvados.org/arvados.git/sdk/go/arvados"
- "golang.org/x/net/context"
)
type bindmount struct {
)
type bindmount struct {
@@
-16,31
+16,29
@@
type bindmount struct {
}
type containerSpec struct {
}
type containerSpec struct {
- Image string
- VCPUs int
- RAM int64
- WorkingDir string
- Env map[string]string
- BindMounts map[string]bindmount
- Command []string
- EnableNetwork bool
- NetworkMode string // docker network mode, normally "default"
- CgroupParent string
- Stdin io.Reader
- Stdout io.Writer
- Stderr io.Writer
+ Image string
+ VCPUs int
+ RAM int64
+ WorkingDir string
+ Env map[string]string
+ BindMounts map[string]bindmount
+ Command []string
+ EnableNetwork bool
+ CUDADeviceCount int
+ NetworkMode string // docker network mode, normally "default"
+ CgroupParent string
+ Stdin io.Reader
+ Stdout io.Writer
+ Stderr io.Writer
}
// containerExecutor is an interface to a container runtime
// (docker/singularity).
type containerExecutor interface {
}
// containerExecutor is an interface to a container runtime
// (docker/singularity).
type containerExecutor interface {
- // ImageLoaded determines whether the given image is already
- // available to use without calling ImageLoad.
- ImageLoaded(imageID string) bool
-
// ImageLoad loads the image from the given tarball such that
// it can be used to create/start a container.
// ImageLoad loads the image from the given tarball such that
// it can be used to create/start a container.
- LoadImage(filename string) error
+ LoadImage(imageID string, imageTarballPath string, container arvados.Container, keepMount string,
+ containerClient *arvados.Client) error
// Wait for the container process to finish, and return its
// exit code. If applicable, also remove the stopped container
// Wait for the container process to finish, and return its
// exit code. If applicable, also remove the stopped container
@@
-62,6
+60,8
@@
type containerExecutor interface {
// Release resources (temp dirs, stopped containers)
Close()
// Release resources (temp dirs, stopped containers)
Close()
- // Give the executor access to arvados client & container info
- SetArvadoClient(containerClient *arvados.Client, keepClient IKeepClient, container arvados.Container, keepMount string)
+ // Name and version of runtime engine ("docker 20.10.16", "singularity-ce version 3.9.9")
+ Runtime() string
+
+ GatewayTarget
}
}