Giter VIP home page Giter VIP logo

devcontainers-rstudio's Introduction

Zero-setup R workshops with GitHub Codespaces

This is the repository supporting the presentation "Zero-setup R workshops with GitHub Codespaces".

You can recreate the demos in the talk using the steps outlined below.

Dev Containers in GitHub Codepaces

If you have access to GitHub CodeSpaces, click the green "<> Code" button at the top right on this repository page, and then select "Create codespace on main". (GitHub CodeSpaces is available with GitHub Enterprise and GitHub Education.)

Now, browse to the file explore-analyze-data-with-R/solution/challenge-Data_Exploration.ipynb. Work through the Jupyter Notebook.

To open RStudio Server, click the Forwarded Ports "Radio" icon at the bottom of the VS Code Online window.

Forwarded Ports

In the Ports tab, click the Open in Browser "World" icon that appears when you hover in the "Local Address" column for the Rstudio row.

Ports

This will launch RStudio Server in a new window. Log in with the username and password rstudio/rstudio.

  • NOTE: Sometimes, the RStudio window may fail to open with a timeout error. If this happens, try again, or restart the Codepace.

In RStudio, use the File menu to open the /workspaces, folder and then browse to open the file devcontainers-rstudio / explore-analyze-data-with-R / solution / all-systems-check / test.Rmd. Use the "Knit" submenu to "Knit as HTML" and view the rendered "R Notebook" Markdown document.

  • Note: You may be prompted to install an updated version of the markdown package. Select "Yes".

Resources and Links

Thanks to

Image Credits

Images used in presentation slides:

Feedback

If you have any comments or suggestions about this presentation, please leave an issue in this repository.

devcontainers-rstudio's People

Contributors

davidmhleung avatar eitsupi avatar revodavid 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

devcontainers-rstudio's Issues

Add quarto support?

It would be useful to set up Quarto so that it can be used from within VSCode.
https://github.com/quarto-dev/quarto-vscode

Since quarto is not currently installed in rocker/tidyverse (it is bundled with RStudio Server but not added to the path), we will need to change the base image to rocker/verse or run /rocker_scripts/install_quarto.sh must be executed to install quarto cli.

Now rocker/tidyverse:4.2 already has quarto cli installed!

cannot install lumi package

cram/cram_io.c:53:10: fatal error: bzlib.h: No such file or directory
53 | #include <bzlib.h>
| ^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile.Rhtslib:135: cram/cram_io.o] Error 1
make[1]: Leaving directory '/tmp/RtmpUB64Er/R.INSTALL5fa55ea1a1b/Rhtslib/src/htslib-1.15.1'
make: *** [Makevars.common:22: htslib] Error 2
ERROR: compilation failed for package ‘Rhtslib’

Is there anynoe can help me with it?

R version is not latest

Hi, it doesnt seem as though the expected behavior of the R set up is working as intended, it seems to install R 4.2.1 where the latest now is 4.2.2

Thanks

Error on boot of codespace

Forked repo and tried creating codespace off of main but ran into the following error.

2022-12-15 06:58:08.963Z: #8 10.14 Building dependency tree...
2022-12-15 06:58:09.122Z: 
2022-12-15 06:58:09.122Z: #8 10.26 Reading state information...
2022-12-15 06:58:09.122Z: #8 10.30 E: Unable to locate package liblttng-ust0
2022-12-15 06:58:09.498Z: #8 ERROR: executor failed running [/bin/sh -c apt-get update && export DEBIAN_FRONTEND=noninteractive     && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true"     && usermod -a -G staff ${USERNAME}     && apt-get -y install         python3-pip         libgit2-dev         libcurl4-openssl-dev         libssl-dev         libxml2-dev         libxt-dev     && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts     && python3 -m pip --no-cache-dir install radian     && pip --disable-pip-version-check --no-cache-dir install pybryt     && pip --disable-pip-version-check --no-cache-dir install pylint     && pip --disable-pip-version-check --no-cache-dir install jupyter     && pip --disable-pip-version-check --no-cache-dir install datascience     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install numpy     && pip --disable-pip-version-check --no-cache-dir install pandas     && pip --disable-pip-version-check --no-cache-dir install scipy     && pip --disable-pip-version-check --no-cache-dir install folium>=0.9.1     && pip --disable-pip-version-check --no-cache-dir install matplotlib     && pip --disable-pip-version-check --no-cache-dir install ipywidgets>=7.0.0     && pip --disable-pip-version-check --no-cache-dir install bqplot     && pip --disable-pip-version-check --no-cache-dir install nbinteract>=0.0.12     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install okpy     && pip --disable-pip-version-check --no-cache-dir install scikit-learn     && install2.r --error --skipinstalled --ncpus -1         languageserver         httpgd         statip         patchwork         paletteer         here         doParallel         janitor         vip         ranger         palmerpenguins         skimr         nnet         kernlab         plotly         factoextra         cluster         tidymodels         markdown         ottr     && rm -rf /tmp/downloaded_packages]: exit code: 100
2022-12-15 06:58:09.498Z: ------
2022-12-15 06:58:09.498Z:  > [dev_container_auto_added_stage_label  3/10] RUN apt-get update && export DEBIAN_FRONTEND=noninteractive     && /bin/bash /tmp/library-scripts/common-debian.sh "true" "rstudio" "1000" "1000" "false" "true" "true"     && usermod -a -G staff rstudio     && apt-get -y install         python3-pip         libgit2-dev         libcurl4-openssl-dev         libssl-dev         libxml2-dev         libxt-dev     && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts     && python3 -m pip --no-cache-dir install radian     && pip --disable-pip-version-check --no-cache-dir install pybryt     && pip --disable-pip-version-check --no-cache-dir install pylint     && pip --disable-pip-version-check --no-cache-dir install jupyter     && pip --disable-pip-version-check --no-cache-dir install datascience     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install numpy     && pip --disable-pip-version-check --no-cache-dir install pandas     && pip --disable-pip-version-check --no-cache-dir install scipy     && pip --disable-pip-version-check --no-cache-dir install folium>=0.9.1     && pip --disable-pip-version-check --no-cache-dir install matplotlib     && pip --disable-pip-version-check --no-cache-dir install ipywidgets>=7.0.0     && pip --disable-pip-version-check --no-cache-dir install bqplot     && pip --disable-pip-version-check --no-cache-dir install nbinteract>=0.0.12     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install okpy     && pip --disable-pip-version-check --no-cache-dir install scikit-learn     && install2.r --error --skipinstalled --ncpus -1         languageserver         httpgd         statip         patchwork         paletteer         here         doParallel         janitor         vip         ranger         palmerpenguins         skimr         nnet         kernlab         plotly         factoextra         cluster         tidymodels         markdown         ottr     && rm -rf /tmp/downloaded_packages:
2022-12-15 06:58:09.498Z: 
2022-12-15 06:58:09.499Z: #8 5.942 Running apt-get update...
2022-12-15 06:58:09.499Z: #8 6.198 Hit:1 http://security.ubuntu.com/ubuntu jammy-security InRelease
2022-12-15 06:58:09.499Z: #8 6.326 Hit:2 http://archive.ubuntu.com/ubuntu jammy InRelease
2022-12-15 06:58:09.499Z: #8 6.457 Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
2022-12-15 06:58:09.499Z: #8 6.588 Hit:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease
2022-12-15 06:58:09.499Z: 
2022-12-15 06:58:09.499Z: 
2022-12-15 06:58:09.499Z: #8 10.26 Reading state information...
2022-12-15 06:58:09.499Z: #8 10.30 E: Unable to locate package liblttng-ust0
2022-12-15 06:58:09.499Z: ------
2022-12-15 06:58:09.503Z: ERROR: failed to solve: executor failed running [/bin/sh -c apt-get update && export DEBIAN_FRONTEND=noninteractive     && /bin/bash /tmp/library-scripts/common-debian.sh "${INSTALL_ZSH}" "${USERNAME}" "${USER_UID}" "${USER_GID}" "${UPGRADE_PACKAGES}" "true" "true"     && usermod -a -G staff ${USERNAME}     && apt-get -y install         python3-pip         libgit2-dev         libcurl4-openssl-dev         libssl-dev         libxml2-dev         libxt-dev     && apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts     && python3 -m pip --no-cache-dir install radian     && pip --disable-pip-version-check --no-cache-dir install pybryt     && pip --disable-pip-version-check --no-cache-dir install pylint     && pip --disable-pip-version-check --no-cache-dir install jupyter     && pip --disable-pip-version-check --no-cache-dir install datascience     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install numpy     && pip --disable-pip-version-check --no-cache-dir install pandas     && pip --disable-pip-version-check --no-cache-dir install scipy     && pip --disable-pip-version-check --no-cache-dir install folium>=0.9.1     && pip --disable-pip-version-check --no-cache-dir install matplotlib     && pip --disable-pip-version-check --no-cache-dir install ipywidgets>=7.0.0     && pip --disable-pip-version-check --no-cache-dir install bqplot     && pip --disable-pip-version-check --no-cache-dir install nbinteract>=0.0.12     && pip --disable-pip-version-check --no-cache-dir install otter-grader     && pip --disable-pip-version-check --no-cache-dir install okpy     && pip --disable-pip-version-check --no-cache-dir install scikit-learn     && install2.r --error --skipinstalled --ncpus -1         languageserver         httpgd         statip         patchwork         paletteer         here         doParallel         janitor         vip         ranger         palmerpenguins         skimr         nnet         kernlab         plotly         factoextra         cluster         tidymodels         markdown         ottr     && rm -rf /tmp/downloaded_packages]: exit code: 100
2022-12-15 06:58:09.523Z: Stop (56870 ms): Run: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.26.0-1671087432608/Dockerfile-with-features -t vsc-devcontainers-rstudio-bbfd0d6c0abb26cf4b2640ac7d450c49 --target dev_containers_target_stage --build-arg VARIANT=4 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /var/lib/docker/codespacemount/workspace/devcontainers-rstudio/.devcontainer
2022-12-15 06:58:09.523Z: Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /tmp/devcontainercli-root/container-features/0.26.0-1671087432608/Dockerfile-with-features -t vsc-devcontainers-rstudio-bbfd0d6c0abb26cf4b2640ac7d450c49 --target dev_containers_target_stage --build-arg VARIANT=4 --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /var/lib/docker/codespacemount/workspace/devcontainers-rstudio/.devcontainer
2022-12-15 06:58:09.523Z:     at Zne (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1866:1635)
2022-12-15 06:58:09.523Z:     at processTicksAndRejections (internal/process/task_queues.js:95:5)
2022-12-15 06:58:09.523Z:     at async EF (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:1963)
2022-12-15 06:58:09.523Z:     at async x7 (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1865:901)
2022-12-15 06:58:09.523Z:     at async oie (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:2093)
2022-12-15 06:58:09.523Z:     at async qf (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1871:3239)
2022-12-15 06:58:09.523Z:     at async Mse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1995:16211)
2022-12-15 06:58:09.523Z:     at async Lse (/usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js:1995:15965)
2022-12-15 06:58:09.551Z: Stop (57928 ms): Run: /usr/bin/node /usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --workspace-folder /var/lib/docker/codespacemount/workspace/devcontainers-rstudio --id-label Type=codespaces --log-level info --log-format json --config /var/lib/docker/codespacemount/workspace/devcontainers-rstudio/.devcontainer/devcontainer.json --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --skip-post-create --update-remote-user-uid-default never --mount-workspace-git-root false
2022-12-15 06:58:09.551Z: Exit code 1

====================================== ERROR ====================================
2022-12-15 06:58:09.564Z: Failed to create container.
=================================================================================
2022-12-15 06:58:09.575Z: Error: Command failed: /usr/bin/node /usr/lib/node_modules/@microsoft/vscode-dev-containers-cli/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /var/lib/docker/codespacemount/.persistedshare --container-data-folder .vscode-remote/data/Machine --container-system-data-folder /var/vscode-remote --workspace-folder /var/lib/docker/codespacemount/workspace/devcontainers-rstudio --id-label Type=codespaces --log-level info --log-format json --config /var/lib/docker/codespacemount/workspace/devcontainers-rstudio/.devcontainer/devcontainer.json --override-config /root/.codespaces/shared/merged_devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=bind,source=/.codespaces/agent/mount/cache,target=/vscode --skip-post-create --update-remote-user-uid-default never --mount-workspace-git-root false
2022-12-15 06:58:09.576Z: Error Code: 1302

Problem with devcontainer.json

devcontainer.json does not build in JetBrains IDE 2024.1 and VSCode.

JetBrains IDE Welcome screen -> DevContainers -> New DevContainer (from VCS Project, Docker must be installed.) Insert the git@ link of the repository with devcontainer.json. -> "Build container and Continue"
image
image

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.