Comments (14)
Hi Winston
In order:
- we are not yet that concerned with productionalizing this, but a nightly cronjob could be put on top of this; right now each commit triggers builds of all (!!) container and we're up to 10... -- so may make sense to split this off
- it's called texlive these days, rather than tetex, and we do install a bunch in r-devel and hadleyverse
- you can use containers interactively by launching with
-i -t
and making the command/bin/bash
from rocker.
Hi Winston,
Thanks for the feedback / use cases, very helpful.
- re entering the container; right, sometimes you'll want to enter the container that is running your RStudio instance as a persistent daemon, rather than just launching an interactive container. I agree that
nsenter
is entirely the way to go here.
I put this in my .bashrc
:
function dock { sudo nsenter -m -u -n -i -p -t `docker inspect --format {{.State.Pid}} "$1"` /bin/bash; }
And then I can just use dock rstudio
to enter the container (as root), provided I launched it with the flag --name=rstudio
.
- Re order of installation -- Yeah, haven't thought too much about leveraging caching. Note that we have to specify the RStudio .deb explicitly, so it's not grabbing the latest version necessarily. Lemme know if there's a clever way around that. At the moment all the images build in a reasonable time and on Docker Hub's servers anyway. And caching builds can be subtle, e.g. how to let docker know which layers you want rebuilt.
from rocker.
Thanks for the tip about using nsenter
. Now if only nsenter
were simpler to install on host machines...
For installation order, it's not just build time -- it's more about the time that it takes for users to download an updated image. For example, if you first install RStudio and then texlive in an image, then update RStudio and rebuild the image, users will have to download gigabytes more data than if you had installed texlive and then RStudio.
I imagine that doing things this way would result in even more Dockerfiles though. Pretty soon you'll need a Makefile to build all the Dockerfiles. :)
from rocker.
@wch thanks for clarifying, that's a good point. We don't really optimize not changing layers within an image, e.g. we've opted to run apt-get upgrade
at the top of each container. Like you say, that can get complicated quickly. Definitely worth thinking about.
Re. installing nsenter
-- why not just run it as a docker container?
docker run -v /usr/local/bin:/target jpetazzo/nsenter
from rocker.
@cboettig I did actually install nsenter
with that method. It's just that it has to download tons of stuff (the image size is 353 MB) just to compile a ~1MB binary. When you're spinning up VM hosts, it would be nice to make that more efficient.
from rocker.
But if you want a more lightweight r-devel .... then nothing beats building it locally. Just sayin' ...
from rocker.
I'm told that you can get the latest RStudio version by looking at this URL:
https://s3.amazonaws.com/rstudio-server/current.ver
And with that info, you can get the URL for latest RStudio build.
from rocker.
Very nice as I just mentioned to Carl over in another thread -- thanks for that!
from rocker.
Regarding point one, have a look at this auto-build.
I'll run it manually for a few days, and may then crontab it.
from rocker.
Excellent!
from rocker.
The 'trick' attempted to shrink he nighly r-devel build worked -- eddelbuettel/drd now comes in at under 800mb which is not too shabby.
from rocker.
Nice! What was the trick?
from rocker.
Single RUN command so that the files "disappear" before the AUFS layer is created. Because once layered, space can currently not be reclaimed. More discussion in this thread I started on docker-user.
from rocker.
@wch Seems like Docker has granted your wish for a better alternative to nsenter
: http://blog.docker.com/2014/10/docker-1-3-signed-images-process-injection-security-options-mac-shared-directories/
With Docker 1.3 you can now just run docker exec -it <container> bash
to enter the container.
from rocker.
Related Issues (20)
- Distroless R? HOT 2
- Use reticulate and python in docker container to deploy plumber api HOT 1
- libk5crypto in r-base image doesn't work: "Random number generator could not be seeded while getting initial credentials" HOT 8
- rocker/r-base:4.2.1: addgroup: addgroup with two arguments is an unspecified operation. HOT 3
- r-base:4.1.2 and higher on ppc64le does not work. HOT 4
- apt-get install failing for libssl-dev with dpkg error in docker build HOT 6
- Cannot connect to SQL database HOT 4
- cannot build docker due to usrmerge failing HOT 4
- `'lib = "/usr/local/lib/R/site-library"' is not writable` error when install R packages by non-root user HOT 3
- wiki: best practices for creating dockerfiles HOT 6
- `r-base` (Docker Official Image) is not updated HOT 5
- Migrating from Dockerhub? HOT 3
- Container for RStudio (not server) HOT 1
- MRAN repository snapshots were deleted - Failing jobs because packages can't be found anymore HOT 5
- docker v18 & packages repositories & rocker's images HOT 5
- unable to load shared object
- Update results in deletion of all install package...
- installation testing fails HOT 1
- r: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory
- Docker image r-base:4.2.1 not reproducible HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocker.