Task #7492

Project WP #641: WP5 - Supporting Blue Assessment: VREs Development [Months: 1-30]

Project Task #642: T5.1 Stock Assessment VRE [Months: 1-30]

Project Activity #1674: VRE Stock Assessment Workplan

Project Activity #1679: ICES Stock Assessment VRE

Task #1778: Toolbox for Data Limited Stocks

Task #7491: Length-based indicator application

Use LBI application as shinyproxy use-case

Added by Scott Large over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:Mar 15, 2017
Priority:UrgentDue date:
Assignee:Scott Large% Done:

100%

Category:Default
Sprint:WP05
Infrastructure:
Milestones:
Duration:

Description

The LBIndicators application is ready to be used as a shiny proxy use-case

https://github.com/ices-tools-dev/LBI_shiny


Related issues

Blocked by BlueBRIDGE - Project Activity #5823: Able to deploy docker containers Closed Mar 15, 2017

History

#1 Updated by Leonardo Candela over 2 years ago

  • Assignee set to Scott Large

Who is the assignee of this ticket? Who is expected to take care of it?

#2 Updated by Pasquale Pagano over 2 years ago

  • Sprint changed from Unsprintable to WP05
  • Assignee changed from Scott Large to Andrea Dell'Amico
  • Category set to Default

I believe this is a case for testing ShinyProxy. I am assigning it to @andrea.dellamico@isti.cnr.it

#3 Updated by Andrea Dell'Amico about 2 years ago

#4 Updated by Andrea Dell'Amico about 2 years ago

  • Status changed from New to In Progress

There is no dockerfile inside the github repository. Where do I find one? Or where do I find a suitable docker image?

#5 Updated by Pasquale Pagano about 2 years ago

  • Priority changed from Normal to Urgent
  • Assignee changed from Andrea Dell'Amico to Scott Large

@scott.large@ices.dk could you provide the required information? We are blocked since 2 weeks now. Thanks.

#6 Updated by Andrea Dell'Amico about 2 years ago

Andrea Dell'Amico wrote:

There is no dockerfile inside the github repository. Where do I find one? Or where do I find a suitable docker image?

@scott.large@ices.dk @julien.barde@ird.fr can you give us an answer? we are stuck on this task.

#7 Updated by Nathan Vaughan about 2 years ago

Shiny proxy requires a custom docker image for each app. Here is a walkthrough of building a docker image for the shiny app https://www.shinyproxy.io/deploying-apps/

#8 Updated by Andrea Dell'Amico about 2 years ago

Nathan Vaughan wrote:

Shiny proxy requires a custom docker image for each app. Here is a walkthrough of building a docker image for the shiny app https://www.shinyproxy.io/deploying-apps/

We know that, my question was specific to the LBIndicators app. There's no dockerfile into the github repository, I was expecting to find one. Or do we are supposed to build it by ourselves - for this, and for all the apps that you will need to deploy in future -?

#9 Updated by Nathan Vaughan about 2 years ago

I haven't worked specifically with the LBindicators app but you are right the app developer is going to need to build the docker image for their own apps before submitting for deployment.

#10 Updated by Andrea Dell'Amico about 2 years ago

Thank you. So we need to wait for a deployable application to completely test the shinyproxy service.

#11 Updated by Julien Barde about 2 years ago

We have Shinyapps like this one: https://goo.gl/Bj3tfb but we don't know how to build a dockerfile for you to deploy it .... how can we create one ?

#12 Updated by Nathan Vaughan about 2 years ago

I have attempted to build a docker image for the LBI application from Scotts github files. I have the Dockerfile folder I used in a github at
https://github.com/nathanvaughan1/shinyproxy-LBI/tree/master/shinyproxy-LBI
I built this using the shinyproxy template. The docker image is very large even once tarred and gzipped (400mb) so I have included a dropbox link to the file in the github readme file. Let me know if there are any issues. Cheers,
Nathan Vaughan

#13 Updated by Andrea Dell'Amico about 2 years ago

I don't see the link to the dropbox archive.

#14 Updated by Nathan Vaughan about 2 years ago

It should be inside the readme file for the github but here it is for convenience

https://www.dropbox.com/s/btk0qf2qdv414aa/shinyproxy_LBI.tar.gz?dl=0

#15 Updated by Andrea Dell'Amico about 2 years ago

I see that you used the example dockerfile almost verbatim, but from the app description it seems that you need at least knitr and some pieces of LaTeX.
I also need a name, the command that starts the app and all the stuff that we need to add to the shinyproxy configuration. Something like

- name: LBI_shiny
    display-name: LBI shiny app
    docker-cmd: ["R", "-e shiny::runApp('/root/LBI_shiny')"]
    docker-image: openanalytics/shinyproxy-template

If you do not plan to host your images on a docker hub, please do not compress them. The docker import command is able to download tar files from a URL, but not compressed ones.

#16 Updated by Andrea Dell'Amico about 2 years ago

Nathan Vaughan wrote:

It should be inside the readme file for the github but here it is for convenience

https://www.dropbox.com/s/btk0qf2qdv414aa/shinyproxy_LBI.tar.gz?dl=0

It's not a valid tar file:

$ tar ztf shinyproxy_LBI.tar.gz
tar: This does not look like a tar archive
tar: Skipping to next header
tar: A lone zero block at 6
tar: Exiting with failure status due to previous errors

#17 Updated by Nathan Vaughan about 2 years ago

Hey Andrea, to follow up on your comments. I'm not sure what you are seeing in the LBI app to suggest that Knitr or Latex are needed, I ran the app on my machine without either with no problem. I was uncertain about what to remove from the template as I am not an expert in Linux and didn't see the benefit in removing anything that may be critical. I updated the template to include the required R packages for LBI, the new folder directories, and the launch command docker-cmd: ["R", "-e shiny::runApp('/root/LBI_shiny')"]. I compressed the tar to try to simplify transfer as it was 2gb, is that compression the issue you are having with the tar file. Part of a larger discussion I think is whether it is optimal for us to send you a built image or provide the Dockerfile and associated shiny code which will allow us to use github. Thanks Nathan.

#18 Updated by Andrea Dell'Amico about 2 years ago

Nathan Vaughan wrote:

Hey Andrea, to follow up on your comments. I'm not sure what you are seeing in the LBI app to suggest that Knitr or Latex are needed,

I looked up the R code. But as the image weights 2GB, it's possible that LaTeX and knitr are already part of the base docker image.

I ran the app on my machine without either with no problem. I was uncertain about what to remove from the template as I am not an expert in Linux and didn't see the benefit in removing anything that may be critical. I updated the template to include the required R packages for LBI, the new folder directories, and the launch command docker-cmd: ["R", "-e shiny::runApp('/root/LBI_shiny')"]. I compressed the tar to try to simplify transfer as it was 2gb, is that compression the issue you are having with the tar file. Part of a larger discussion I think is whether it is optimal for us to send you a built image or provide the Dockerfile and associated shiny code which will allow us to use github. Thanks Nathan.

I'm not having problems with the compression. I can gunzip the file successfully, it's the tar command that fails. I downloaded the file a couple of times always with the same result.
On how to provide the image: I want to minimize the manual part of the procedure, if no manual steps is not an option. Other than that, you're free to propose the solution that fits best with your workflow.

#19 Updated by Nathan Vaughan about 2 years ago

Hi Andrea, sorry it took me a little time to get up to speed on this it is my first time developing a docker image for shiny proxy. I followed your advice and have now set up a docker hub automated build of the LBI app. This should allow automated updates to the image if any changes are made to the original app or Dockerfile. Thanks for the directions on what is required, let me know if anything else is needed so I can best streamline this for future developement. The docker hub build can be found at https://hub.docker.com/r/nathanvaughan/shinyproxy-lbi/

#20 Updated by Andrea Dell'Amico about 2 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Feedback

Cool!
The application is available. It starts and I was able to select one of the example data sets.

#21 Updated by Andrea Dell'Amico about 2 years ago

There's support from more than one docker container but it's also possible to include more than one application into a single container, btw.

#22 Updated by Andrea Dell'Amico about 2 years ago

  • Status changed from Feedback to Closed

Also available in: Atom PDF