<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/fragment-dit4c-docker-base-containers-for-edu-remote-computing-labs/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/"> Rstats – OUseful.Info, the blog…</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p><em>What’s an effective way of helping a student run a desktop application when their own computer won’t run the application, for whatever reason, locally? Virtualised software, running remotely, provides one solution. So here’s an example of a project that looks at doing just that: </em> <a rel="nofollow" href="https://dit4c.github.io/" target="_blank">DIT4C (“Data Intensive Tools for the Cloud”)</a>, <em>‘<strong>a platform for hosting data analysis tools “in the cloud” using containers</strong>‘</em> [<a rel="nofollow" href="https://github.com/dit4c/" target="_blank">repo</a>].</p>
<p>Prepackaged, standalone containers are defined for a range of applications, including RStudio, Jupyter notebooks, Jupyter+R and OpenRefine</p>
<h2>Standalone Containers With Branded Landing Page</h2>
<p>The application containers are built on top of a base container that includes an <em>nginx</em> webser/proxy, a GoTTY shell and a file uploader. The individual containers then have a “homepage” that links to the particular application:</p>
<p><img data-orig-file="https://ouseful.files.wordpress.com/2017/10/jupyter_w__python_3.png?w=450&amp;h=355&amp;fit=601%2C355" data-orig-size="2070,1222" data-medium-file="https://ouseful.files.wordpress.com/2017/10/jupyter_w__python_3.png?w=450&amp;h=355&amp;fit=601%2C355?w=300" data-attachment-id="16953" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/jupyter_w__python_3.png?w=450&h=355&fit=601%2C355" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/jupyter_w__python_3/" data-large-file="https://ouseful.files.wordpress.com/2017/10/jupyter_w__python_3.png?w=450&amp;h=355&amp;fit=601%2C355?w=830" alt="" data-image-title="Jupyter_w__Python_3" sizes="(max-width: 601px) 100vw, 601px" data-comments-opened="1" class="wp-image-16953" data-recalc-dims="1"></p>
<p>So what do we have at this point?</p>
<ul>
<li>a branded landing page;</li>
<li>browser accessed shell:<img data-orig-file="https://ouseful.files.wordpress.com/2017/10/gotty_-_login_-f_researcher_term_xterm-256color__dcf7e8136c01_.png?w=450&amp;h=145&amp;fit=471%2C145" data-orig-size="1440,444" data-medium-file="https://ouseful.files.wordpress.com/2017/10/gotty_-_login_-f_researcher_term_xterm-256color__dcf7e8136c01_.png?w=450&amp;h=145&amp;fit=471%2C145?w=300" data-attachment-id="16954" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/gotty_-_login_-f_researcher_term_xterm-256color__dcf7e8136c01_.png?w=450&h=145&fit=471%2C145" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/gotty_-_login_-f_researcher_term_xterm-256color__dcf7e8136c01_/" data-large-file="https://ouseful.files.wordpress.com/2017/10/gotty_-_login_-f_researcher_term_xterm-256color__dcf7e8136c01_.png?w=450&amp;h=145&amp;fit=471%2C145?w=830" alt="" data-image-title="GoTTY_-_login_-f_researcher_TERM_xterm-256color__dcf7e8136c01_" sizes="(max-width: 471px) 100vw, 471px" data-comments-opened="1" class="wp-image-16954" data-recalc-dims="1"></li>
<li>a browser accessed file uploader:<img data-orig-file="https://ouseful.files.wordpress.com/2017/10/index_for_http___localhost_32768_files_.png?w=450&amp;h=366&amp;fit=830%2C366" data-orig-size="2212,976" data-medium-file="https://ouseful.files.wordpress.com/2017/10/index_for_http___localhost_32768_files_.png?w=450&amp;h=366&amp;fit=830%2C366?w=300" data-attachment-id="16955" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/index_for_http___localhost_32768_files_.png?w=450&h=366&fit=830%2C366" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/index_for_http___localhost_32768_files_/" data-large-file="https://ouseful.files.wordpress.com/2017/10/index_for_http___localhost_32768_files_.png?w=450&amp;h=366&amp;fit=830%2C366?w=830" alt="" data-image-title="Index_for_http___localhost_32768_files_" sizes="(max-width: 830px) 100vw, 830px" data-comments-opened="1" class="wp-image-16955" data-recalc-dims="1"></li>
</ul>
<p>These services are all running within a single container. I don’t know if there’s a way of linking multiple containers using docker-compose? This would require finding some way of announcing the services provided by each container, to a central <em>nginx</em> server which could then link to each from a single homepage. But this would mean separate terminals and file loaders into each one (though maybe the shared files could be handled as a single mounted volume shared across all the linked containers?</p>
<p>Once again, I’m coming round to the idea that using a single container to run <em>multiple</em> services, rather than several linked containers each running a single service, is simpler, even if it does go against the (ideal?) model of using containers as part of a small pieces, loosely joined architecture? I think I need to post a simple recipe (or recipes) somewhere that show different ways of running multiple services within a single container. The docker docs  – <a rel="nofollow" href="https://docs.docker.com/engine/admin/multi-service_container/" target="_blank">Run multiple services in a container</a> – provide a crib in to this at the moment.</p>
<h2>X11 Applications</h2>
<p>Skimming the docs, I notice reference to a base <a rel="nofollow" href="https://github.com/dit4c/dockerfile-dit4c-container-x11" target="_blank">X11 desktop</a> container. Interesting… I have a PhD student looking for an easy way to host a Qt widget running application in the cloud for evaluation purposes. To this end I’ve just started looking around for X11/<a rel="nofollow" href="https://github.com/novnc/noVNC" target="_blank">noVNC</a> web client containers that would allow us to package the app in a simple container then access it from something like Digital Ocean (given there’s no internal OU docker container hosting service that I’m allowed to access (or am aware of… Maybe on the Faculty cluster?)).</p>
<p>So things like this show the way – a container that offers a link to a containerised “desktop” application, in this case QGIS (does the background colour mean anything, I wonder? How could we make use of background colour in OU containers?):</p>
<p><a rel="nofollow" href="https://github.com/dit4c/dockerfile-dit4c-container-qgis" target="_blank"><img data-orig-file="https://ouseful.files.wordpress.com/2017/10/localhost_32769.png?w=447&amp;h=396&amp;fit=447%2C396&amp;resize=447%2C396" data-orig-size="1402,1242" data-medium-file="https://ouseful.files.wordpress.com/2017/10/localhost_32769.png?w=447&amp;h=396&amp;fit=447%2C396&amp;resize=447%2C396?w=300" data-attachment-id="16958" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/localhost_32769.png?w=447&h=396&fit=447%2C396&resize=447%2C396" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/localhost_32769/" data-large-file="https://ouseful.files.wordpress.com/2017/10/localhost_32769.png?w=447&amp;h=396&amp;fit=447%2C396&amp;resize=447%2C396?w=830" alt="" data-image-title="localhost_32769" sizes="(max-width: 447px) 100vw, 447px" data-comments-opened="1" class="wp-image-16958" data-recalc-dims="1"></a><br>
Following the <em>X11 Session</em> link, we get to a desktop:</p>
<p><img data-orig-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc-0.png?w=450&amp;h=265&amp;fit=507%2C265" data-orig-size="2512,1312" data-medium-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc-0.png?w=450&amp;h=265&amp;fit=507%2C265?w=300" data-attachment-id="16960" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc-0.png?w=450&h=265&fit=507%2C265" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/c47e58d380bc_0_-_novnc-0/" data-large-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc-0.png?w=450&amp;h=265&amp;fit=507%2C265?w=830" alt="" data-image-title="c47e58d380bc_0_-_noVNC-0" sizes="(max-width: 507px) 100vw, 507px" data-comments-opened="1" class="wp-image-16960" data-recalc-dims="1"></p>
<p>There’s an icon in the toolbar to the application we want – QGIS:</p>
<p><img data-orig-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc.png?w=450&amp;h=362&amp;fit=609%2C362" data-orig-size="2554,1520" data-medium-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc.png?w=450&amp;h=362&amp;fit=609%2C362?w=300" data-attachment-id="16959" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc.png?w=450&h=362&fit=609%2C362" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/c47e58d380bc_0_-_novnc/" data-large-file="https://ouseful.files.wordpress.com/2017/10/c47e58d380bc_0_-_novnc.png?w=450&amp;h=362&amp;fit=609%2C362?w=830" alt="" data-image-title="c47e58d380bc_0_-_noVNC" sizes="(max-width: 609px) 100vw, 609px" data-comments-opened="1" class="wp-image-16959" data-recalc-dims="1"></p>
<p>What I’m thinking now is this could be handy for running the V-REP robot simulator, and maybe Gephi…</p>
<p>It also makes me think that things could be simplified a little further by offering a link to <em>QGIS</em>, rather than <em>X11 Application</em>, and opening the application in full screen mode (on the virtualised desktop) on start-up. (See <em>Distributing Virtual Machines That Include a Virtual Desktop To Students – V-REP + Jupyter Notebooks</em> for some thoughts on how to use VMs to distribute a single pre-launched on startup desktop application to try to simplify the student experience.)</p>
<p>It also makes me even more concerned about the apparent lack of interest in the OU, and even awareness of, the possibilities of virtualised software offerings. For example, at a recent SIG group on (interactive) maps/mapping, brief mention was made of using QGIS, and problems arising therefrom (though I forget the context of the problems). Here we have a solution – out there for all to see and anyone to find – that demonstrates the use of QGIS in a prebuilt container. But who, internally, would think to mention that? I don’t think any of the Tech Enhanced Learning folk I’ve spoken to would even consider it, if they are even aware of it as an option?</p>
<p>(Of course, in testing, it might be rubbish… how much bandwidth is required for a responsive experience when creating detailed maps? See also one of my earlier related experiments: <a rel="nofollow" href="https://blog.ouseful.info/2016/05/04/more-docker-doodlings-accessing-gui-apps-via-a-browser-from-a-container-using-guacamole/" target="_blank">Accessing GUI Apps Via a Browser from a Container Using Guacamole</a>, which remotely accessing the Audacity audio editor using a cloud hosted container.)</p>
<h2>The Platform Offering</h2>
<p>Skimming through the repos, I (mistakenly, as it happens) thought I saw a reference to <em>resbaz</em> (<a rel="nofollow" href="https://blog.ouseful.info/2015/10/30/resbaz-containerised-research-apps-as-a-service/" target="_blank">ResBaz Cloud – Containerised Research Apps as a Service</a>). I was mistaken in thinking I <em>had</em> seen a reference in the code I skimmed though, but not, it seems, in the fact that there is a relationship:</p>
<p><img data-orig-file="https://ouseful.files.wordpress.com/2017/10/search_c2b7_org_dit4c_resbaz.png?w=406&amp;h=307&amp;fit=406%2C307&amp;resize=406%2C307" data-orig-size="870,658" data-medium-file="https://ouseful.files.wordpress.com/2017/10/search_c2b7_org_dit4c_resbaz.png?w=406&amp;h=307&amp;fit=406%2C307&amp;resize=406%2C307?w=300" data-attachment-id="16956" data-image-meta="{" data-image-description="" src="https://ouseful.files.wordpress.com/2017/10/search_c2b7_org_dit4c_resbaz.png?w=406&h=307&fit=406%2C307&resize=406%2C307" data-permalink="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/search_%c2%b7_org_dit4c_resbaz/" data-large-file="https://ouseful.files.wordpress.com/2017/10/search_c2b7_org_dit4c_resbaz.png?w=406&amp;h=307&amp;fit=406%2C307&amp;resize=406%2C307?w=830" alt="" data-image-title="Search_·_org_dit4c_resbaz" sizes="(max-width: 406px) 100vw, 406px" data-comments-opened="1" class="wp-image-16956" data-recalc-dims="1"></p>
<p>And so it seems that perhaps more interestingly than the standalone containers is that DIT4C is a <em>platform</em> offering (<a rel="nofollow" href="https://dit4c.github.io/architecture.html" target="_blank">architecture docs</a>), providing authenticated access to users, file persistence (presumably?) and the ability to launch prebuilt docker images as required.</p>
<p>That said, looking at the Github repository commits for the project, there appears to have been little activity since March 2017 and the <a rel="nofollow" href="https://gitter.im/dit4c/dit4c/" target="_blank">gitter channel</a> appears to have gone silent at the end of 2016. In addition, the <a rel="nofollow" href="https://dit4c.github.io/running.html" target="_blank">docs</a> for getting an instance of the platform up and running are a little bit too sparse for me to follow easily…</p>
<p>So maybe as a project, DIT4C is perhaps now “of historical interest” only, rather than being a live project we might have been able to jump on the back of to get an OU hosted remote computing lab up and running? <img alt="🙁" src="https://s.w.org/images/core/emoji/2.3/72x72/1f641.png" class="wp-smiley"> That said, the <a rel="nofollow" href="https://resbazblog.wordpress.com/" target="_blank">ResBaz (<em>Res</em>earch <em>Baz</em>aar)</a> initiative, <em>“worldwide festival promoting the digital literacy emerging at the center of modern research”</em>, still seems to be around…</p>
<p> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ouseful.wordpress.com/16952/" target="_blank"><img border="0" alt="" src="http://feeds.wordpress.com/1.0/comments/ouseful.wordpress.com/16952/"></a> <img border="0" alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" data-recalc-dims="1"></p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.ouseful.info/2017/10/22/fragment-docker-base-containers-for-edu-remote-computing-labs/"> Rstats – OUseful.Info, the blog…</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/wViEbXpOxlE" height="1"></a></div>