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: envd up with --gpu-set #1861

Merged
merged 6 commits into from
Mar 11, 2024
Merged

feat: envd up with --gpu-set #1861

merged 6 commits into from
Mar 11, 2024

Conversation

arugal
Copy link
Contributor

@arugal arugal commented Mar 11, 2024

Command help

[user@localhost test]$ envd up -h
NAME:
   envd up - Build and run the envd environment

USAGE:
   envd up [command options] [arguments...]

CATEGORY:
   Basic Commands

OPTIONS:
   --tag value, -t value                                                     Name and optionally a tag in the 'name:tag' format (default: PROJECT:dev)
   --name value                                                              environment name
   --path value, -p value                                                    Path to the directory containing the build.envd (default: ".")
   --volume value, -v value [ --volume value, -v value ]                     Mount host directory into container
   --from file:func, -f file:func                                            Function to execute, format file:func (default: "build.envd:build")
   --use-proxy, --proxy                                                      Use HTTPS_PROXY/HTTP_PROXY/NO_PROXY in the build process (default: false)
   --timeout value                                                           Timeout of container creation (default: 30s)
   --shm-size value                                                          Configure the shared memory size (megabyte) (default: 2048)
   --cpus value                                                              Request CPU resources (number of cores), such as 0.5, 1, 2
   --cpu-set 0-3                                                             Limit the specific CPUs or cores the environment can use, such as 0-3, `1,3`
   --memory value                                                            Request Memory, such as 512Mb, 2Gb
   --detach                                                                  Detach from the container (default: false)
   --no-gpu                                                                  Launch the CPU container even if it's a GPU image (default: false)
   --gpus config.gpu()                                                       Number of GPUs used in this environment, this will override the config.gpu() (default: 0)
   --gpu-set all                                                             GPU devices used in this environment, such as all, `'"device=1,3"'`, `count=2`(all to pass all GPUs). This will override the `--gpus`
   --force                                                                   Force rebuild and run the container although the previous container is running (default: false)
   --host value                                                              Assign the host address for the environment SSH access server listening (default: "127.0.0.1")
   --export-cache type=registry,ref=<image>, --ec type=registry,ref=<image>  Export the cache (e.g. type=registry,ref=<image>)
   --import-cache type=registry,ref=<image>, --ic type=registry,ref=<image>  Import the cache (e.g. type=registry,ref=<image>)
   --platform value                                                          Specify the target platform for the build output, (for example, windows/amd64, linux/amd64, or darwin/arm64) (default: linux/amd64)
   --help, -h                                                                show help

Use example

  1. envd up --gpu-set all
image image
  1. envd up --gpu-set '"device=1,3"'
image image
  1. envd up --gpu-set count=2
image image
  1. envd up --gpu-set '"device=2,3"' --gpus 1
image image
  1. envd up --gpts 4
image image

Issues

Closes: #1810

@arugal arugal requested review from aseaday and zwpaper as code owners March 11, 2024 08:40
arugal added 5 commits March 11, 2024 16:41
Signed-off-by: zhangwei <[email protected]>
Signed-off-by: zhangwei <[email protected]>
Signed-off-by: zhangwei <[email protected]>
Signed-off-by: zhangwei <[email protected]>
Signed-off-by: zhangwei <[email protected]>
@gaocegege gaocegege requested review from gaocegege and kemingy March 11, 2024 09:50
Copy link
Member

@kemingy kemingy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! 🎉

@kemingy kemingy merged commit d61ca2e into tensorchord:main Mar 11, 2024
11 of 12 checks passed
@kemingy
Copy link
Member

kemingy commented Mar 11, 2024

@all-contributors Please add @arugal for the code.

Copy link
Contributor

@kemingy

I've put up a pull request to add @arugal! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: the "evnd up" command adds a gpu-set parameter that looks like "docker run --gpus"
2 participants