TidyTuesday: Deploying Shiny Apps using Docker

  Рет қаралды 14,482

Andrew Couch

Andrew Couch

Күн бұрын

Пікірлер: 20
@AndrewCouch
@AndrewCouch Жыл бұрын
Hey everyone a good website for determining package dependencies is packagemanager.posit.co/client/#/. You can set your system to whatever linux distribution, choose the R environment, and then lookup the packages used in scripts for the container. The packages will then tell you the necessary libraries you would need to import. Hope it helps!
@mkklindhardt
@mkklindhardt 2 жыл бұрын
Thanks for sharing your experience on Docker and R! Looking forward to more
@forestquality5400
@forestquality5400 2 жыл бұрын
Great help Andrew. Much appreciated
@thesixmax
@thesixmax 3 жыл бұрын
Interesting! What I found less intuitive about Docker (only been using it for the last 6 months really) is the integration with 'renv' for library and package version control. In particular renv::restore(), which keeps reinstalling everything on any change to the renv lock file. And I agree with you that straightforward resources are scarce. Being an (Arch) Linux user, I found the lib part of the Docker script to be more straightforward; often times, I need to install certain dependencies for a R package to even work, so I already know which packages will cause issues prior to deploying my scripts in Docker. In particular packages creating graphical outputs and some ML packages can be a bit of hassle. Looking forward to the rest of Season 2!
@paraggemini
@paraggemini 3 жыл бұрын
Thank you for this. Can you please do a video on hosting shiny apps on Azure using docker? And probably connecting a DB and user authentication too. Thanks!
@AndrewCouch
@AndrewCouch 3 жыл бұрын
I actually am starting to use Azure at my work but I'm not sure if it is feasible to do it for my series since it would require viewers to have access to Azure resources. I think I can work on a video for authentication and DB stuff could also be in a separate video. Thanks for the video suggestions!
@paraggemini
@paraggemini 3 жыл бұрын
@@AndrewCouch I will be waiting for that. AWS is free for a year. Maybe hosting app on AWS and can be accessible to public with user authentication (Auth0, maybe?). Also, connecting DB would be great. Probably, Mongo. I recently learnt that problem with SQL DB is SQL injection attack. lol
@carlbroker
@carlbroker 3 жыл бұрын
Thanks for putting this together - by chance do you have the file `Final_Model.rds`? I appears you did not include it in your repo.
@AndrewCouch
@AndrewCouch 3 жыл бұрын
Final_Model.rds is just all of the model files combined so you would need load them individually. github.com/andrew-couch/UFC-Sports-Betting-Model/tree/master/Models
@joanne7644
@joanne7644 3 жыл бұрын
Thanks Andrew for the explanation and informative video and resources! Great guide. Will you by any chance be possible to cover tutorial to set up a sample shinyproxy connecting to external database or authentication framework (eg. Keycloak)?
@jberilo
@jberilo 5 күн бұрын
Hello Andrew. Good morning. Excellent lesson on Shiny with Docker. I tried to replicate it on my computer but I couldn't load the app. I took a look at Docker and saw that there was an error. It says it couldn't find the Tidyverse package but I saw in the dockerfile that it is in the installation list. Can you help me? Thanks.
@AndrewCouch
@AndrewCouch 5 күн бұрын
There are a few different ways to install tidyverse in a dockerfile. You can install it with an R command like this: RUN R -e "install.packages(pkgs=c('tidyverse', repos='cran.rstudio.com/')" Use a docker image that already contains Tidyverse: FROM rocker/tidyverse Or use install2.r RUN install2.r --error --skipinstalled --ncpus -1 \ tidyverse \ && rm -rf /tmp/downloaded_packages From my understanding install2.r is the preferred choice for installing packages or using an image that already contains the package. install.packages errors are not captured when building images so you can add more specifications using install2.r. You also may need to install more system libraries which is another pain. The best way to figure out what are the necessary libraries is using packagemanager.posit.co/client/#/repos/cran/packages/overview?search=tidyverse. For example you would also need to run for tidyverse apt-get install -y libicu-dev apt-get install -y make apt-get install -y libcurl4-openssl-dev apt-get install -y libssl-dev apt-get install -y libx11-dev apt-get install -y zlib1g-dev apt-get install -y libfontconfig1-dev apt-get install -y libfreetype6-dev apt-get install -y libfribidi-dev apt-get install -y libharfbuzz-dev apt-get install -y libjpeg-dev apt-get install -y libpng-dev apt-get install -y libtiff-dev apt-get install -y pandoc apt-get install -y libxml2-dev
@jberilo
@jberilo 5 күн бұрын
@@AndrewCouch Thanks Andrew. I will follow your recommendations. Att.
@princesslizzy5675
@princesslizzy5675 2 жыл бұрын
Thank you very much
@安田源
@安田源 2 жыл бұрын
hi ,if i want to share my deployed app in internel network ,what should i do ,cause localhost:3838 cannot open by other ,thanks
@TURALOWEN
@TURALOWEN Жыл бұрын
Could you do a video where you deploy this Shiny app to AWS?
@vinayak894
@vinayak894 Жыл бұрын
when I run the same scripts on mac it says that "no matching manifest for linux/arm64/v8 in the manifest list entries"
@catherinedoudou6288
@catherinedoudou6288 Жыл бұрын
did you solve it?
@vinayak894
@vinayak894 Жыл бұрын
@@catherinedoudou6288 didn’t try this.
@My-NaMeS_jEfF
@My-NaMeS_jEfF Жыл бұрын
Of course, doesn’t take a genius, but they like to make you think it does. Nice video thank you
TidyTuesday: End of Season 1 Q&A
36:55
Andrew Couch
Рет қаралды 1,9 М.
TidyTuesday: Reactive Dashboards with R Shiny
28:16
Andrew Couch
Рет қаралды 8 М.
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Chain Game Strong ⛓️
00:21
Anwar Jibawi
Рет қаралды 41 МЛН
Docker Image BEST Practices - From 1.2GB to 10MB
7:15
Better Stack
Рет қаралды 142 М.
Deploying a CARET ML R model to Docker
25:06
Hutsons-Hacks
Рет қаралды 2,3 М.
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 469 М.
R Shiny for Data Science Tutorial - Build Interactive Data-Driven Web Apps
1:26:19
How to deploy Shiny Server with AWS
29:45
Tim Abraham
Рет қаралды 16 М.
Saturn Cloud Webinar: Styling Shiny R Apps
54:08
Saturn Cloud
Рет қаралды 5 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 371 М.
Shiny in Production 2022: Andrew Patterson - Dockerising a Shiny App
15:53
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН