-
Notifications
You must be signed in to change notification settings - Fork 606
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
Use nvidia-container-toolkit instead of nvidia-docker2 to expose GPUs in Cortex local #1223
Comments
Hi, is nvidia-docker2 still supported? I have docker version < 19.03 and nvidia-docker2 install and I would like to leverage GPU without having to upgrade docker. Currently with v0.20 it doesn't seem like GPU is made available inside the service. Can you please clarify? |
@dakshvar22 yes, it should fall back on nvidia-docker2 if nvidia-container-toolkit is not found. What is the error message that you see when you try? |
I don't see any error, but the GPU isn't visible inside the container and
hence not used by the inference API.
…On Sun, Oct 11, 2020, 04:30 David Eliahu ***@***.***> wrote:
@dakshvar22 <https://github.com/dakshvar22> yes, it should fall back on
nvidia-docker2 if nvidia-container-toolkit is not found. What is the error
message that you see when you try?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCOBGJGWTNB4LMD7IM3FD3SKEKD3ANCNFSM4O4SS2UA>
.
|
@dakshvar22 are you running an example from the cortex repo (if so, which one?), or your own API (if so, which predictor type?). Also, what is the base image you're using for the API container, or are you using the default? |
I am using my own API which is just a Python Predictor API since my model
is trained in fairseq lib. I am using the default GPU docker image which is
mentioned in the docs for python predictor API.
…On Sun, Oct 11, 2020, 16:59 David Eliahu ***@***.***> wrote:
@dakshvar22 <https://github.com/dakshvar22> are you running an example
from the cortex repo (if so, which one?), or your own API (if so, which
predictor type?). Also, what is the base image you're using for the API
container, or are you using the default?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1223 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCOBGKPSW2W6HDZKJMGKX3SKHB6LANCNFSM4O4SS2UA>
.
|
@dakshvar22 do you mind sharing your For example, the Dockerfile might just show: FROM cortexlabs/python-predictor-gpu-slim:0.20.0-cuda10.1
RUN ... # install your dependencies And your class PythonPredictor:
def __init__(self, config):
print(is_gpu_visible()) # replace is_gpu_visible() with the the appropriate function call
def predict(self, payload):
return "ok" |
@dakshvar22 In addition the the information requested by @deliahu, it would also be helpful if you can share the output |
Description
Cortex local currently relies on setting up a docker runtime with nvidia-docker2 to access gpus. This method is deprecated as of Docker version 19.03. For Docker versions >= 19.03, GPUs should be accessible via
--gpus all
flag after installing nvidia-container-toolkit https://github.com/NVIDIA/nvidia-docker#quickstart.If it is possible, support both ways of exposing GPUs to Cortex local.
The text was updated successfully, but these errors were encountered: