Giter VIP home page Giter VIP logo

shiny-wordcloud's Introduction

Build Status DOI

Dockerized Shiny App

This is the Dockerized Shiny App Wordcloud

This Dockerfile is based on Debian "testing" and r-base image.

The image is available from Docker Hub.

Usage:

To run this Shiny App on your computer:

docker run --rm -p 80:80 flaviobarros/shiny-wordcloud

and it will avaliable at http://127.0.0.1/ or http://localhost

You can run the container at other ports. It can happen that there is some service running at PORT 80, as Apache ou Nginx. To run the app at PORT 3838 for example, you can use:

docker run --rm -p 3838:80 flaviobarros/shiny-wordcloud

Intented usage:

This project can be used as a start point to build any dockerized shiny app that could be distributed at any server running docker. Possible use cases are:

  • Deploy a single Shiny App at AWS, Google Compute Engine, Azure or a private server with docker.
  • Deploy Shiny Apps at a docker based PaaS as dokku.

Building your own Shiny App:

After developing your Shiny App, you will need two files for deployment: ui.R and server.R. Then:

  • Remove all files from folder mypp (these files are from Wordcloud example) and put your files there, ui.R and server.R
  • Build a docker image with:
docker build -t yourname/yourappname .

At this poit you will be able to run your app, just like Wordcloud.

Deploy with a docker based PaaS

If you have a PaaS with Dockerfiles support, like Deis or Dokku, you can git push this image. I just wrote a post with further instructions: Git pushing Shiny Apps with docker and dokku

Stargazers over time

Stargazers over time

IMPORTANT

This project is not an alternative Shiny Server. It exposes PORT 80 (not 3838) and is intented to serve only single shiny apps.

shiny-wordcloud's People

Contributors

anapaulamagalhaes avatar cboettig avatar eddelbuettel avatar flaviobarros avatar kdpsingh avatar matthieubizien avatar pjastam avatar wch avatar wetrobot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

shiny-wordcloud's Issues

unable to build image with updated r-base:latest

Apparently after recent r-base image push (3 days ago):

https://hub.docker.com/r/library/r-base/tags/

it is impossible to build docker image:

The following packages have unmet dependencies:
 libcairo2-dev : Depends: libx11-dev but it is not going to be installed
                 Depends: libxrender-dev (>= 0.6) but it is not going to be installed
                 Depends: libxext-dev but it is not going to be installed
                 Depends: libxcb1-dev (>= 1.6) but it is not going to be installed
                 Depends: libxcb-render0-dev (>= 1.6) but it is not going to be installed
                 Depends: libxcb-shm0-dev but it is not going to be installed
 libxt-dev : Depends: libx11-dev but it is not going to be installed

I was able to build image when switching r-base tag back to 3.1.2 version.

In this context switching dynamic latest tag to specific one could save troubles.

Docker build fails on openssl install

The build fails with:

    http://ftp.us.debian.org/debian/pool/main/o/openssl/libssl0.9.8_0.9.8o-4squeeze14_amd64.deb:
2016-05-23 15:09:04 ERROR 404: Not Found.

This error is fatal. The wget and dpkg -i combination seems somewhat error prone. Why is openssl required in exactly this version? Are you sure the normal repos are unsuitable?

multiple shiny apps

Thanks, I have got this running on my dokku server, I haven't tried yet but what are the issues with using this approach to host multiple shiny apps on the same server?

Dockerfile Downloads

This is more of a question, rather than an issue. I want to ask some things about the dockerfile you have created, since I started using docker only a few days ago and your example is the only viable on the internet at the moment, regarding R shiny and how it can be used with docker.

a) Why are you using r-base instead of, lets say, rocker/shiny? Are there differences? Is there a particular reason you picked the first?
b) Why are you downloading debian files? Are they needed for running the containers? Are they connected with the proper run of the r shiny apps? If so, how?
c) In your example you are exposing the port 80 and you have created a conf file which listens to the same port. Can you give more info or similar examples about the .conf file? Can you explain the last CMD command you are giving in the Dockerfile?

I hope Im not an annoyance, thanks in advance and am looking forward to your replies.

How to get R 3.4?

I'm having some trouble updating a docker image cloned from shiny-wordcloud. One of the packages I need is DiagrammeR which requires R 3.4.0 (see error message from Docker build below). However, FROM: r-base:latest installs R 3.3.3. Is there an easy way to get 3.4.0 or 3.4.1 installed in a Docker build? Thanks!

* installing *source* packageDiagrammeR...
** packageDiagrammeRsuccessfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
  namespacegrDevices3.3.3 is already loaded, but >= 3.4.0 is required
ERROR: lazy loading failed for packageDiagrammeR* removing/usr/local/lib/R/site-library/DiagrammeR

fork review

Not really an issue but ...

I forked your shiny-wordcloud repo to https://github.com/radiant-rstats/docker-radiant today. I adapted the Docker file and everything seems to work as intended locally. I also pushed the image to Docker Hub (vnijs/radiant). This is my first attempt at dockerizing so I'd be happy to hear any comments or suggestions you might have (e.g., is using RUN git clone ... in the Dockerfile a good idea?).

Running container does not work

Hi

I am trying to replicate your demo. I cloned the source files into my own machine, and ran docker build -t word-cloud to create an image.

Then I tried to run the image with docker run -it --rm -p 80:80 word-cloud but got the error "exec:\"/usr/bin/shiny-server.sh\":permission denied"

I then used CMD["chmod", "+x", "/usr/bin/shiny-server.sh"] instead of CMD["/usr/bin/shiny-server.sh"] and this time no error popped up, nothing happened afterwards - the app was not running.

If I pull your image from Docker Hub and did the same everything worked fine!

Do you have any idea about why this might happen? Thanks a lot!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.