Closed vwxyzjn closed 2 years ago
Hi, we don't add GPUs to the docker container unless the job requests them and utils.python
defaults to 0 gpus. Can you try passing --gpu 2
to the utils.python component?
https://github.com/pytorch/torchx/blob/main/torchx/components/utils.py#L134
https://github.com/pytorch/torchx/blob/main/torchx/schedulers/docker_scheduler.py#L292-L302
It works! Thank you!
🐛 Bug
Can't use GPU with the
local_docker
scheduler.Module (check all that applies):
torchx.spec
torchx.component
torchx.apps
torchx.runtime
torchx.cli
torchx.schedulers
torchx.pipelines
torchx.aws
torchx.examples
other
To Reproduce
Steps to reproduce the behavior:
test.py
withDockerfile
Expected behavior
Notice that torch identifies the GPU device when running with
poetry run torchx run --scheduler local_cwd utils.python --script test.py
, but it fails to do so when running withpoetry run torchx run --scheduler local_docker utils.python --script test.py
. Also, when runningdocker run --gpus all test:latest python test.py
, GPU is also recognized.Environment
Additional context