-
Notifications
You must be signed in to change notification settings - Fork 273
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
sharing libraries via orchestration #107
Comments
that seems ... hard |
Here's a sketch of one possible approach. I have no idea whether this is feasible at all. Call the container you're running is the main container, and the one you're mounting volumes form the aux container.
If the volume isn't mounted on the host container, I think these extra paths will just be ignored. It would also be nice if it were possible to have a stable, unchanging Docker image with TeX on it, and access it this way. But on the other hand, this sort of feels like we're rebuilding a regular stateful Linux distribution with Docker containers... Edit: Mounting the aux container's root dir probably isn't a good idea. It would be better to mount the specific directories needed. |
@wch Thanks for the suggestion; mounting each of the specific directories as needed and setting the paths with the appropriate environmental variables makes sense; I'll give that a go. Yup, I've used this strategy for tex before: http://www.carlboettiger.info/2014/11/05/notes.html In this case it is easy because the install of texlive from source in leodido/texlive means there's no need to also link shared libraries. (Sometimes it's handy to have the all of texlive-full available, though for regular use I still think it makes sense to have some basic tex support on the rocker container; at least as long a LaTeX remains so integrated into R). Note that it takes a long time to launch a container with a shared volume as large as texlive-full. Re: reinventing the wheel. Yeah, I wonder about that too. Though I suppose the norms are still evolving somewhat for this more abstracted context. |
@wch hmm, I must be missing something but I'm not seeing a way in which I can change where the volume is mounted on the main (e.g.
It's not obvious to me how I would modify this call such that the |
Ah-ha! It looks like one can work around this, it just requires a bit more manual approach than the the convenience of |
Oh, interesting, that is more complicated than I expected. I had sort of assumed that it would be as simple as mapping directories from the host (like I also just learned about the |
Winston wrote:
I understand what you mean, but this is seen from a programmer's perspective with a Unix background. My medical colleagues are locked in a corporate (=hospital) Windows installation. To create a custom report with a Shiny interface and pdf output, they have to ask their IT to install R, R-packages, Latex, and possibly RStudio. No chance that anything will be done, because the IT fears supporting this (mess). If you can supply everything in a container, it may work out; I am not sure, though, currently flying a kit. |
@cboettig so did you get it to work? Can you post the final solution based on the stackoverflow thread as applicable to shiny and rstudio containers? |
No, not yet. I tried to get Compose to work on Boot2Docker/Windows, but it ended up in a big struggle against Pythonic creatures - see stackoverflow for some "not so working and maybe working" solution. Have given up and went back to https://bitbucket.org/dmenne/rstudio-shiny-server-on-ubuntu. |
@schugh-gopivotal The approach from that stackoverflow post works for most packages, but it can be messy in general if you have packages that depend on shared libraries. For instance, you can map each of the directories in In general, I think the the best solution is to install the necessary libraries within each container. Composing containers and using |
Close for inactivity? |
Yup thanks |
@wch @eddelbuettel Thought you both would have a better idea on how to do this than I do.
Winston: quick background: wondering how a user can best mix & match containers without having to stack one on top of the other by writing a new Dockerfile with
FROM
. For example, imagine wanting to access R libraries installed onrocker/hadleyverse
from therocker/shiny
container.I just took a quick look at what it would take to do the orchestration approach suggested earlier (e.g. linking containers together). This is kinda a task for
--volumes-from
, e.g. if we do:we can now load R libraries that are installed on the rocker/hadleyverse container from inside the shiny container, e.g.
library("plyr")
However, this only works when there are no external lib dependencies for the package, since the only volume we have grabbed from hadleyverse is the site.library (also, this clobbers the existing /usr/local/lib/R/site.library, not obvious how to avoid that). For instance,
library(XML)
will fail because the shared XML.so lib cannot find libxml2 on the shiny container.Is there any good way around this? e.g. a way to install standalone binaries instead of shared binaries such that the containers are more suitable for linking up in this way?
Thanks for your thoughts
The text was updated successfully, but these errors were encountered: