Git Product home page Git Product logo

smartdesktop-rstudio's Introduction

YakData SmartDesktop with RStudio Server Open Source

The smart, portable, reproducible way to develop R programs, Shiny web apps & RMarkdown docs on your desktop. Includes R 4.1.3, the RStudio IDE, the tidyverse, verse and geospatial-related tools from the R rocker-org project as a web app. All wrapped neatly into Docker via docker-compose.


Apple MacBook Pro M1 Pro Chip users!

If you are using the The Apple M1 Pro Chip, this repository will not work. The M1 Pro Chip ARM64 architecture has broken underlying software used by RStudio. Please try this repository instead, https://github.com/Stephen-McDaniel/SmartDesktop-RStudio-M1-Chip-Experimental.


ggplot2

πŸš€ Features

  • YakData SmartDesktop with RStudio Server Open Source is the smart way to develop R programs, Shiny web apps & RMarkdown docs on your desktop. It includes R 4.1.3 from the Rocker project and the RStudio IDE as a web app all wrapped neatly into Docker.
  • Save hours of time to get up and running with a complete desktop IDE for R.
  • Preloaded with the tidyverse, verse and geospatial-related tools from the R rocker-org project! Includes tex & publishing-related packages from verse.
  • Designed to install packages from RStudio Package Manager on a fixed date. Easily change this in Rprofile.site. Rapid installation of most packages as this image is based on Ubuntu.
  • Easy access to all the RStudio configuration and startup values.
  • The end of complex uninstall/upgrade paths for R and RStudio on your laptop/desktop system.
  • Easily recreate an identical environment on another system.
  • Run multiple versions of R side-by-side with multiple SmartDesktop project directories.
  • Define various environments for a particular R version with multiple docker-compose files.
  • Control resources used by your R sessions with docker-compose. No more system lock because an R session unexpectedly stole all your desktop resources.
  • Pause and restart a long-running R session with Docker Desktop!

πŸ“· Screenshots

  • ggplot2 graph ggplot2

  • Shiny app graph brushing Shiny app graph brushing

  • Install package to site-library
    Install package to site-library

🧰 Install and setup

We recommend a desktop with a minimum of 1 CPU, 4 GB of RAM and at least 20 GB of free disk storage. Your project needs may vary widely based on your apps, usage patterns and data volumes. This repository is strictly intended for local, desktop usage. The running container is not secured with encryption.

  1. Install Docker and docker-compose on your system. a. Install Docker Desktop on Windows at https://docs.docker.com/desktop/windows/install/, or b. Install Docker Desktop on Mac at https://docs.docker.com/desktop/mac/install/
  2. Download this repository.
  3. Unzip this repository and move it to the desired location on your computer. For example, on my Mac, it is at /Users/yakdata-stephen/Documents/Development/YakData-SmartDesktop-for-RStudio
  4. Open the terminal on your computer and change directories to the install location. Now navigate one directory down to apps. cd /Users/yakdata-stephen/Documents/Development/YakData-SmartDesktop-for-RStudio
  5. With one command you will download the needed images (one time only) and start the RStudio Server. This will take a while, depending on your internet speed and your computer speed. After the first time, it will typically take 7-20 seconds to start. docker-compose up -d
  6. Check that it is running. docker ps; View the logs. docker logs;
  7. Navigate to your new RStudio IDE from your favorite browser. http://localhost:4120/
  8. Enjoy a portable, reproducible R experience!

Internal to Ubuntu, RStudio maps all content to /home/rstudio, which appears in this project tree as /yakdata/content.

When installing new packages from the RStudio Packages tab -> Install button, be certain to change the dropdown to the project tree location, /yakdata/site-library/R/4.1.3. If you don't use the docker mounted volume path, your installed libraries will disappear once you stop and restart the docker container.

πŸ”’ Running this securely on a remote system

If you would like to run this on a remote server, I strongly recommend locking down all ports on your server except a port for a VPN server and a port for SSH terminal connection. Then, install a VPN server on your remote system to secure your connection from your desktop, a leading one on Github is https://hub.docker.com/r/kylemanna/openvpn

If you use a remote server approach, we also recommend adding a password to RStudio. Change the environment section in docker-compose to replace the current setting with - PASSWORD=MyPasswordHere If you add a password, CHANGE the one on the above line. The user name for logging into the IDE is "rstudio".

An alternative remote server approach is to use the YakData SmartManager for ShinyProxy, which includes RStudio Server Open Source along with many other valuable systems for development and secure sharing of Shiny apps, RMarkdown documents and more.

πŸ” LICENSE

Distributed under the Apache 2.0 license at https://apache.org/licenses/LICENSE-2.0.

RStudio is a registered trademark of RStudio, PBC. YakData is a service mark of YakData, LLC. RStudio products, other content from the Rocker project and from CRAN are subject to other licenses which you are bound to by using these components/systems.

⭐ Inspiration

  • RStudio Open Source Server IDE is a free, open-source IDE for R, Shiny apps and RMarkdown content.
  • The RStudio Open Source Server IDE is backed by years of development, feedback and releases.
  • Make it easy to create a reproducible, self-contained R development environment on any system.

If you benefit from this project, please give it a ⭐.

πŸ“« Issues

Please share issues in this repository Issues.

πŸ“˜ Docs

RStudio IDE repository: https://github.com/rstudio/rstudio

RStudio Package Manager: https://packagemanager.rstudio.com/client/#/

Docker Desktop: https://docs.docker.com/desktop/

🎑 Alternatives

Alternatives include self-install of the R, the RStudio IDE, tidyverse, verse and more directly on your OS.

πŸ§‘β€πŸ’» Discussion

Head over to The YakData Community. You can login to comment with your Github account, a Google account or your email and a password.

πŸŽ‰ Releases

4.1.3
Released March, 17th, 2022.

  1. Upgrade R from 4.1.2 to 4.1.3.
  2. Make permanent package installation the default path for new package installs via the RStudio UI.
  3. Updated the R session start messages. This is customizable in the ./yakdata/config/R/Rprofile.site file.
  4. Ran tests Using the main repository push to Github, I downloaded the main repository zip file and ran it per the documentation.
    a. βœ… The R version is upgraded to 4.1.3.
    b. βœ… Successfully ran the R sample program.
    c. βœ… Successfully ran the shiny sample app, interacted with app.
    d. βœ… Checked that the package install works as expected, using the permanent path by default.
    e. βœ… Checked that session start messages work as expected.

4.1.2

Original release in February, 2022.

smartdesktop-rstudio's People

Contributors

stephen-mcdaniel avatar

Stargazers

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

Watchers

 avatar  avatar

smartdesktop-rstudio's Issues

SmartDesktop and DockerDesktop

I cannot find anywhere the answer to my simple 2 questions.
What is the purpose of Docker in simple terms and does it need to be running all the time (when using SmartDesktop-RStudio)?
I am more interested in the answer to. the second question really.

Could not connect to R seesion on RStudio Server

Hi,

Im getting some errors to start R session,
Screen Shot 2022-06-10 at 12 26 20 pm

Screen Shot 2022-06-10 at 12 26 07 pm

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_set_env: executing... 
skipping /var/run/s6/container_environment/HOME
skipping /var/run/s6/container_environment/RSTUDIO_VERSION
[cont-init.d] 01_set_env: exited 0.
[cont-init.d] 02_userconf: executing... 
mv: cannot stat '/etc/rstudio/disable_auth_rserver.conf': No such file or directory
Skipping authentication as requested
No password supplied
No password supplied
No password supplied
chpasswd: (user rstudio) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user rstudio) password not changed
[cont-init.d] 02_userconf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_set_env: executing... 
skipping /var/run/s6/container_environment/HOME
skipping /var/run/s6/container_environment/RSTUDIO_VERSION
[cont-init.d] 01_set_env: exited 0.
[cont-init.d] 02_userconf: executing... 
mv: cannot stat '/etc/rstudio/disable_auth_rserver.conf': No such file or directory
Skipping authentication as requested
No password supplied
No password supplied
No password supplied
chpasswd: (user rstudio) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user rstudio) password not changed
[cont-init.d] 02_userconf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01_set_env: executing... 
skipping /var/run/s6/container_environment/HOME
skipping /var/run/s6/container_environment/RSTUDIO_VERSION
[cont-init.d] 01_set_env: exited 0.
[cont-init.d] 02_userconf: executing... 
mv: cannot stat '/etc/rstudio/disable_auth_rserver.conf': No such file or directory
Skipping authentication as requested
No password supplied
No password supplied
No password supplied
chpasswd: (user rstudio) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user rstudio) password not changed
[cont-init.d] 02_userconf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.

Im on macOS Monterey, M1 chip. Could you please help. TIA

Enable Password not working

Hi Stephen, I'm trying to add password to rstudio, but it doesn't seems to work. Are you able to advice me what went wrong?

rstudio_compose rstudio_password

using 'rtweet' with SmartDesktop

Great package and so speedy.
BUT, I came to use rtweet to analyse twitter feeds and and came upon the problem of authorisation.
I was directed to the Twitter authorisation page and signed in ok, but on clicking authorise the page came up with an error saying it cannot re-direct back to the webpage that I originally came from (RStudio Desktop).
"This site can’t be reached127.0.0.1 refused to connect."

Could not install an example package - mice

Greetings,

   I am getting below error.   Might you know what may be going wrong?   Please note the weird "{checkbox} Successfully loaded .Rprofile.site" errors in the g++ errors.   Is there something going on with the .Rprofile?   Many thanks,


              Toshi

install.packages("mice")
Installing package into β€˜/yakdata/site-library/R/4.1.3’
(as β€˜lib’ is unspecified)
trying URL 'https://packagemanager.rstudio.com/all/2022-02-15+Y3JhbiwyOjQ1MjYyMTU7REM3MzYwMUI/src/contrib/mice_3.14.0.tar.gz'
Content type 'binary/octet-stream' length 790161 bytes (771 KB)
==================================================
downloaded 771 KB

βœ… Successfully loaded .Rprofile.site

πŸŽ‰ Welcome to YakData SmartDesktop with RStudio Desktop
πŸ“• Learn more at: https://yakdata.com/smart

  • installing source package β€˜mice’ ...
    ** package β€˜mice’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/cpp11/include' -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c RcppExports.cpp -o RcppExports.o
    g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/cpp11/include' -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c legendre.cpp -o legendre.o
    g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/cpp11/include' -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c match.cpp -o match.o
    g++ -std=gnu++11 -I"/usr/local/lib/R/include" -DNDEBUG -I'/usr/local/lib/R/site-library/cpp11/include' -I'/usr/local/lib/R/site-library/Rcpp/include' -I/usr/local/include -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c matchindex.cpp -o matchindex.o
    g++ -std=gnu++11 -shared -L/usr/local/lib/R/lib -L/usr/local/lib -o mice.so RcppExports.o legendre.o match.o matchindex.o βœ… Successfully loaded .Rprofile.site πŸŽ‰ Welcome to YakData SmartDesktop with RStudio Desktop πŸ“• Learn more at: https://yakdata.com/smart -L/usr/local/lib/R/lib -lR
    g++: error: βœ…: No such file or directory
    g++: error: Successfully: No such file or directory
    g++: error: loaded: No such file or directory
    g++: error: .Rprofile.site: No such file or directory
    g++: error: πŸŽ‰: No such file or directory
    g++: error: Welcome: No such file or directory
    g++: error: to: No such file or directory
    g++: error: YakData: No such file or directory
    g++: error: SmartDesktop: No such file or directory
    g++: error: with: No such file or directory
    g++: error: RStudio: No such file or directory
    g++: error: Desktop: No such file or directory
    g++: error: πŸ“•: No such file or directory
    g++: error: Learn: No such file or directory
    g++: error: more: No such file or directory
    g++: error: at:: No such file or directory
    g++: error: https://yakdata.com/smart: No such file or directory
    make: *** [/usr/local/lib/R/share/make/shlib.mk:10: mice.so] Error 1
    ERROR: compilation failed for package β€˜mice’
  • removing β€˜/yakdata/site-library/R/4.1.3/mice’
    Warning in install.packages :
    installation of package β€˜mice’ had non-zero exit status

The downloaded source packages are in
β€˜/tmp/RtmpzOBz9R/downloaded_packages’

From HongKong User, can't see in browser

Hi Mr. McDaniel,

I am reading your post and would like to try out your way to install Rstudio but have some questions after following your steps of doing so. I am not quite familiar with functions to raise questions via Github so I am checking if you could help through e-mail.
(that's the link to your post: https://yakdata.com/best-download-install-rstudio-desktop-mac-windows-2022/)

I am a Windows user, so I unzipped the folder and save it in
C:>cd \Users\spook\Documents\SmartDesktop-RStudio-4.1.2\

and then I did install the docker, but your command is not working I guess for Windows: docker-compose up -d

So I copied and pasted the command given by the docker
docker run -d -p 80:80 docker/getting-started

I assumed the command works
1

but I cannot see the new RStudio IDE from Chrome http://localhost:4120/
​
2

Do you have any idea how I can get and use RStudio?

Thanks for taking the time and looking into the issue!
Best,
Y W

Is there a way to install with singularity?

I'd love to try out your container, but our HPC cluster does not allow docker to be used, only singularity. Is there a way to adapt this to work with singularity? Thanks~!

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.