Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CLI): envd up a GPU image without GPUs #246

Closed
gaocegege opened this issue Jun 8, 2022 · 4 comments
Closed

feat(CLI): envd up a GPU image without GPUs #246

gaocegege opened this issue Jun 8, 2022 · 4 comments

Comments

@gaocegege
Copy link
Member

Description

Now we consider the user wants a GPU if cuda is called in build.envd. But we may need to support envd up --no-gpu.

@kenwoodjw
Copy link
Contributor

mean ignore cuda command?

@gaocegege
Copy link
Member Author

No, users build.envd may look like:

def build():
  cuda(xxx)

When the user run envd up, we will use nvidia-container-runtime to launch a GPU container.

This feature is to launch a CPU container with the same build.envd when user run envd up --no-gpu

@kenwoodjw
Copy link
Contributor

maybe like this?
https://github.com/tensorchord/envd/blob/main/pkg/app/up.go#L146

var CommandUp = &cli.Command{
+		&cli.BoolFlag{
+			Name: "no-gpu",
+			Usage: "launch same cpu container without gpu",
+			Value: false,
		},
	},

	Action: up,
}
gpu_enable := clicontext.Bool("no-gpu")
var gpu bool
if gpu_enable {
gpu = false
}else {
gpu = builder.GPUEnabled()
}
}

@gaocegege
Copy link
Member Author

LGTM.

kenwoodjw added a commit to kenwoodjw/envd that referenced this issue Jun 20, 2022
Signed-off-by: GitHub <noreply@github.com>
gaocegege pushed a commit that referenced this issue Jun 21, 2022
* feat #246

Signed-off-by: GitHub <noreply@github.com>

* code fmt

Signed-off-by: GitHub <noreply@github.com>

* nits

Signed-off-by: GitHub <noreply@github.com>
@gaocegege gaocegege moved this to Done in envd sprint board Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants