-
Notifications
You must be signed in to change notification settings - Fork 86
Adding --gpu={gpu index}
flag to docker option in tutorials.
#1212
Conversation
This PR needs Approvals as follows.
Please choose reviewers and requet reviews! Click to see how to approve each reviewsYou can approve this PR by triggered comments as follows.
See all trigger commentsPlease replace [Target] to review target
|
@ananno |
@iizukak San: I've tested with different combination of these two parameter. The filter first use
So, it seems like the GPU list is first filtered by |
@hadusam As I am unable to judge the validity of this content, could you please confirm it when you have time? |
oh, it's interesting. So, it seems like |
@ananno |
@joelN123 San @iizukak San: And to answer to your question, If you do not use |
understood ! thank you. In that case, it might be good to have |
@joelN123 San: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ananno
Thanks!
It looks good for me to use --gpus
with device=
instead of CUDA_VISIBVLE_DEVICES
.
I left some comments, please check them!
docs/tutorial/image_cls.md
Outdated
> For old docker versions use `--runtime=nvidia` with `-e CUDA_VISIBLE_DEVICES=<gpu indices>` environment variable | ||
> instead of `--gpu device=<gpu indices>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, but I think we don't need these lines because our supported docker version is Docker >= 19.03
.
https://docs.blue-oil.org/install/install.html#prerequisites
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I'll remove it. Thanks for the review.
docs/tutorial/image_cls.md
Outdated
-v $(pwd)/cifar:/home/blueoil/cifar \ | ||
-v $(pwd)/config:/home/blueoil/config \ | ||
-v $(pwd)/saved:/home/blueoil/saved \ | ||
blueoil_$(id -un):{TAG} \ | ||
blueoil train -c config/cifar10_test.py | ||
|
||
Just like init, set the value of `{TAG}` to the value obtained by `docker images`. | ||
Change the value of `CUDA_VISIBLE_DEVICES` according to your environment. | ||
Change the value of `--gpu device=<gpu indices>` according to your environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some typo: --gpu
-> --gpus
, please check them. 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/tutorial/image_cls.md
Outdated
-v $(pwd)/cifar:/home/blueoil/cifar \ | ||
-v $(pwd)/config:/home/blueoil/config \ | ||
-v $(pwd)/saved:/home/blueoil/saved \ | ||
blueoil_$(id -un):{TAG} \ | ||
blueoil train -c config/cifar10_test.py | ||
|
||
Just like init, set the value of `{TAG}` to the value obtained by `docker images`. | ||
Change the value of `CUDA_VISIBLE_DEVICES` according to your environment. | ||
Change the value of `--gpu device=<gpu indices>` according to your environment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are some typo: --gpu
-> --gpus
, please check them. 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/tutorial/image_cls.md
Outdated
@@ -106,15 +106,18 @@ If configuration finishes, the configuration file is generated in the `cifar10_t | |||
Train your model by running `blueoil train` with model configuration. | |||
|
|||
$ docker run --rm \ | |||
-e CUDA_VISIBLE_DEVICES=0 \ | |||
--gpus device=0 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my environment (Docker v19.03.7), this doesn't work.
I think we need to use --gpus '"device=0"'
. It's not beautiful though... 😭
See: NVIDIA/nvidia-docker#1257
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. I'm changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
This reverts commit 02b429b.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ananno
LGTM!
Could you please fix the title of this PR with the correct option? Because the title will be used to commit message of this PR.
Thanks for the nice PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/ready |
⏳Merge job is queued... |
What this patch does to fix the issue.
Adding gpu flag in docs for docker runtime to use GPU. Without this the instructions in tutorials are incomplete and will not use GPU.
Link to any relevant issues or pull requests.