-
Notifications
You must be signed in to change notification settings - Fork 186
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
image for tidymodels, tidyverse, tensorflow, keras with GPU passthrough #561
Comments
Thanks for your question! The best way to install these packages with GPU support is to use the Because python projects typically version their python modules at the project level, often requiring different and sometimes conflicting versions, we do not pre-install a globally shared version of these. Instead, these images provide the CUDA environment for GPU use with these packages, which tends to be the more finicky aspect to set up. You can easily install any of the R packages you mention in the usual way, and use their built-in installers to select your chosen version of python modules. Some further documentation is here: https://rocker-project.org/images/versioned/cuda.html . Please let us know if you have other questions, this helps us flush out our documentation in this relatively new area. |
Hi, thanks. I am gone give rocker/ml a try. I wish to install few libraries such as:
what's the best way to do it? |
The base R method,
as shown in https://github.com/rstudio/tensorflow#tensorflow-for-r . |
Hi, in case anyone else comes knocking, here is the docker file I used to re-create/extend the image:
|
The only problem I still have is that I am also running |
AFAIK @fahadshery Are you talking about one of the GPU enabled notebooks? |
@fahadshery you may need to make sure that the version of CUDA drivers on the host machine is at least as new as the version of the CUDA libraries on the container. When Can you show us the output of |
Hello @cboettig - Thanks for your kind advice here. I am trying to make my way to a similar destination: a container that runs R-keras ML analysis. One topic that I seem to be bumping into that I haven't found documented (sorry if I missed it) is how to deal with meeting the python dependency exactly. You mention above that the rocker/ml image doesn't try to do that for good reasons. But to actually make this work we need to satisfy that dependency and it seems that the R-side wants the python on a particular path. This stackoverflow python-in-r-error-could-not-find-a-python-environment-for-usr-bin-python provides a solution that seems to work, but it involves taking these steps in the running container every time:
It is awkward to ask each user to take these steps every time they want to run the container. Is there a means to accomplish these steps as part of the Thanks for any advice you might provide. mark |
Yes. |
Hi @fahadshery - I patterned my
So yes, I'm starting with the same base image as you were, but I'm specifying an R-version. |
Hi @markk-fmi , good question, it depends what you mean by 'every time'. There are at least two quite different use patterns here: users who deploy a persistent container, and users who start up a machine in a freshly pulled container each session. From the description it sounds like you are referring to the latter pattern. In that case, I think the simplest thing to do is define your own derivative dockerfile that performs these two steps. (It can also handle the installation of any particular packages you like to use). Does that make sense? e.g. why not just add
to your Dockerfile? I agree it would be nice to have an 'out-of-the-box' solution, but then it is difficult to for users of a persistent container that may want different python environments configured for different projects. Perhaps we can introduce a second user that has a pre-configured user-wide python env.... |
However, if I run the same using the |
Thanks @cboettig . Perhaps I should have just tried what you suggest. I assumed that the interactive prompt to install miniconda (user needs to type 'Y') would be a problem and prevent the miniconda installation. Maybe that's not true? I looked in the code for |
Hi @fahadshery - the machine I'm currently testing on does not have any GPUs. |
@cboettig - Adding the step you suggested seems to run into the issue of the missing python environment:
|
@cboettig - it looks like it is all very close ... here's the python situation inside the container:
Do you understand the There is a python at that path, right? |
yeah that's weird -- seems to work fine on @eitsupi any idea why this would happen on 4.1.1 ? maybe the older version of reticulate pinned in that version simply did not have as good a system for locating python? |
any idea as to why I am unable to access my GPU when using |
We were working with 4.1.1 simply because that is a version we have other applications in. It is not a hard requirement. I will try 4.2.2 and let you know what happens. |
Hello @cboettig - Thank you for your suggestion. I've tried 4.2.2 and 4.2.1 as you mentioned and they don't seem to work in my hands. 4.2.2 seems to fail to build with the
4.2.1 builds with the
But in Rstudio in the running container we still fail to find the python needed:
Does build and execution of these steps give a different result in your hands? Thanks! |
Hi @cboettig - with 4.2.1 the key hint in the error message above is "No non-system installation of Python". This is because the
which works fine in the container Rstudio WITHOUT installing miniconda python in the container. |
We are deciding to stop supporting anything like |
Just for clarity -- by "here" I believe @eitsupi means "rocker-versioned2" and not "rocker-org" -- as per #903 thread we have a new setup in rocker/ml seeking to support these use cases. The discussion in #903 also mentions several other approaches outside the rocker project that might also be suitable. |
Container image name
No response
Container image digest
No response
What operating system related to this question?
Linux
System information
No response
Question
Hi,
I am looking to install RStudio in docker using
portainer
. What's the best image to install that bundles the following packages:Thanks
The text was updated successfully, but these errors were encountered: