GithubHelp home page GithubHelp logo

binder-test's Introduction

I am a research associate professor at UC Berkeley's Institute for Data Science. I'm passionate about making science more open and research software more visible. In 2011, I co-founded the rOpenSci project and served as its founding director through 2024. I am an advisor for The US Research Software Sustainability Institute, The UK Software Sustainability Institute (SSI), and an advisor to Open Journals. Lately, you can find me on BlueSky.

binder-test's People

Contributors

karthik avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

binder-test's Issues

Binder won't launch with `rocker/binder` >= 4.0.0

Hi,

I followed all the instructions from your tutorial. Everything works fine using rocker/binder images < 4.0.0, but I always run into an error when trying to use newer versions, 4.0.x:

500 : Internal Server Error
The error was:
could not start rstudio in time

My test repo is here, and as you might observe, the "launch binder" button leads to an error. Reverting to the previous commit, where the image rocker/binder:3.6.3 is used, is enough to solve the problem.
Am I missing something? Is there anything to do if we want to use the latest rocker images?


Also, this is completely unrelated, but you seem to have an extra tab in README.md, at the beggining of the last line below, which triggers an error for me with the generate_badge() function.:

<!-- badges: start -->
  [![Launch Rstudio Binder](http://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/karthik/binder-test/master?urlpath=rstudio)
  <!-- badges: end -->

launch binder didn't work for me

It said "taking longer than usual, hang tight", and was there for a while. For whatever its worth I wanted to share. Thanks for this repo!

.Rproj.user folder and minimal gitignore

Transferring discussions in holepuch #25 as they're actually related to binder-test:

Regarding funny things popping up into the workspace, it's definitely causing some unexpected behaviours for me. For example, I just reran write_compendium_description() and now I also have an another file that oddly looks like it's modified:

image

image

DOH! I think I figured it out! It's actually an issue with binder-test repo. There's an .Rproj.user/ in the template repo where it seems information that gets overwritten during use of the package is cached. Is this necessary for the tutorial?

Re: the .Rhistory, it's because the .gitgnore in the binder-test repo is super minimal and doesn't seem to contain some defaults in an RStudio project .gitignore which I guess I've just come to expect to, ie:

.Rproj.user
.Rhistory
.RData
.Ruserdata

Feedback on tutorial

Firstly, really nice straight forward demo! 👏 Here's a couple of points for your consideration:

Capturing versions of dependencies

One thing that’s “maybe missing” is a runtime.txt file, but then I’ve also heard that using a Dockerfile means that runtime.txt is ignored? Indeed this is my main conceptual hole about the Dockerfile + DESCRIPTION approach currently, ie how can we capture specific versions of dependencies? I've tried the package (== version) approach in the DESCRIPTION but that didn't seem to work. This was actually on my top priority to try and figure out so if you have more info on this it would be great to hear!

Launching binder

Clicking the binder button: works like a treat

build_binder(): Am not sure if it works. I’m somewhat unclear at what exactly the function is supposed to do (some detail in the function documentation could help users know what to expect). I’m guessing it’s launching a binder instance but is it supposed to also launch the browser when it’s done? If so it isn’t for me.

It does print out info, including various urls and a token, but it’s unclear what if anything one should do with this. I tried various urls given but the $url in the list printed just leads to a Binder inaccessible error page while the final url the function prints out (https://mybinder.org/build/gh/annakrystalli/testdrive-holepunch/master) just contains the details printed above it.

Minor suggestions

  • Would be good to include a sentence on what the analysis relates to and show the plot so they have something to compare the plot they are getting in their binder and satisfy themselves that everything is working (and of course, everyone loves a pretty plot!).
  • Would also be good to get participants to complete the DESCRIPTION file (to get the hang of it and get them into the habit of doing it.)

Binder failed to launch

Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2dockerhkprv49j'...
HEAD is now at ab660b9 final
Using DockerBuildPack builder
Step 1/8 : FROM rocker/binder:4.0.2
---> af0dd6201b40
Step 2/8 : LABEL maintainer='Ann'
---> Running in c740eb2b1283
Removing intermediate container c740eb2b1283
---> 18b68dc9398a
Step 3/8 : USER root
---> Running in 2a15889ca363
Removing intermediate container 2a15889ca363
---> 0d878893cad9
Step 4/8 : COPY . ${HOME}
---> ebe4fe4d3176
Step 5/8 : RUN chown -R ${NB_USER} ${HOME}
---> Running in 93aa09383567
Removing intermediate container 93aa09383567
---> 615f4b68b112
Step 6/8 : USER ${NB_USER}
---> Running in 3ffb5de4389c
Removing intermediate container 3ffb5de4389c
---> 3c139ba1c9c0
Step 7/8 : RUN wget https://github.com/AnniHuo/gis_code/raw/main/DESCRIPTION && R -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2020-11-12/')); devtools::install_deps()"
---> Running in 3e8ef076c806
--2020-11-12 13:21:10-- https://github.com/AnniHuo/gis_code/raw/main/DESCRIPTION
Resolving github.com (github.com)... 140.82.112.3
Connecting to github.com (github.com)|140.82.112.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://raw.githubusercontent.com/AnniHuo/gis_code/main/DESCRIPTION [following]
--2020-11-12 13:21:10-- https://raw.githubusercontent.com/AnniHuo/gis_code/main/DESCRIPTION
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.0.133, 151.101.64.133, 151.101.128.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.0.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 425 [text/plain]
DESCRIPTION.1: Permission denied

Cannot write to ‘DESCRIPTION.1’ (Success).
Removing intermediate container 3e8ef076c806
The command '/bin/sh -c wget https://github.com/AnniHuo/gis_code/raw/main/DESCRIPTION && R -e "options(repos = list(CRAN = 'http://mran.revolutionanalytics.com/snapshot/2020-11-12/')); devtools::install_deps()"' returned a non-zero code: 3

generate_badge() fails

Hi Karthik!
When I try to run generate_badge() it gives me the following error message:

Error: Invalid block specification.
Must start with <!-- badges: start --> and end with <!-- badges: end -->

My session info is:

sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] holepunch_0.1.28.9000

loaded via a namespace (and not attached):
[1] cliapp_0.1.1 Rcpp_1.0.5 git2r_0.27.1 pillar_1.4.6
[5] compiler_4.0.3 prettyunits_1.1.1 remotes_2.2.0 tools_4.0.3
[9] progress_1.2.2 packrat_0.5.0 pkgbuild_1.1.0 lifecycle_0.2.0
[13] tibble_3.0.4 jsonlite_1.7.1 lubridate_1.7.9 pkgconfig_2.0.3
[17] rlang_0.4.8 cli_2.1.0 rstudioapi_0.11 curl_4.3
[21] withr_2.3.0 stringr_1.4.0 httr_1.4.2 xml2_1.3.2
[25] desc_1.2.0 generics_0.0.2 vctrs_0.3.4 fs_1.5.0
[29] hms_0.5.3 rprojroot_1.3-2 glue_1.4.2 R6_2.4.1
[33] gh_1.1.0 processx_3.4.4 fansi_0.4.1 callr_3.5.0
[37] selectr_0.4-2 magrittr_1.5 ellipsis_0.3.1 usethis_1.6.3
[41] backports_1.1.10 ps_1.4.0 assertthat_0.2.1 renv_0.12.0
[45] ini_0.3.1 stringi_1.5.3 crayon_1.3.4

Hope this helps.
This looks like an awesome project and I would love to make it run for me as well :)

Cheers from across the pond,
Sebastian

Build time normal?

Thank you for creating this. I've been wanting to try Binder for awhile and holepunch makes it a lot more accessible to me.

Without ever having committed or pushed anything to GitHub before, I was able to get your binder-test example working here. The instructions were great (as some minor feedback, I did fumble around a bit with the commit and push steps, so maybe a link to some basic advice for folks there would be helpful).

I filed this issue because the build took a lot longer than I was anticipating. Yesterday it took ~25 minutes. After that initial build, the image only took a minute or two to load after launching afresh from the "launch binder" badge.

However, I tried again today and the Build took even longer. At around the 30 minute mark, I started paying closer attention to the Build log. Packages were being installed from MRAN. A few minutes later, the process seemed to get hung up and I got a failed connection message (which I failed to capture). The build process seemed to freeze after that. Seeing that, I refreshed the browser and the RStudio screen launched within 30 seconds or so.

So my question: is that build time to be expected/normal? Or might I be doing something wrong? If the former, I can understand why. Watching the Build logs, there are a lot of installations happening. I see your mentions of server loads too in answers to earlier issues.

I'm wondering about the latter because your holepunch README mentiones that the Alternate setup method "will take a very long time." I did follow the code on the binder-test README, so I figured I was following your compendium setup. Yet I also saw mention in this issue of the inital image taking "30 seconds to several minutes" to create. So I was, again, thinking that 25 minutes to more than 30 minutes was longer than typical.

In sum, thank you again for making this available. Any tips or assurances that the build times I've been experiencing are what to to expect would be appreciated. Please let me know if additional information from me would be helpful.

Cannot write a Dockerfile without a Git remote.

I tried the holepunch functions and got this error from the write_deockerfile() function:

Error: Cannot write a Dockerfile without a Git remote. Connect this to a git remote before generating a Dockerfile

So I tried this binder-test following your instructions in the readme but got the exact same error. I ran git remote -v to check both times and there is indeed the git remote where it should be for fetch and push.

Any suggestions?

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.