Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expected repo structure and use with Binder config files? #26

Closed
matthewfeickert opened this issue Jun 25, 2020 · 4 comments · Fixed by #27
Closed

Expected repo structure and use with Binder config files? #26

matthewfeickert opened this issue Jun 25, 2020 · 4 comments · Fixed by #27

Comments

@matthewfeickert
Copy link

matthewfeickert commented Jun 25, 2020

@hamelsmu Thanks very much for being so responsive on our discussion over on the Jupyter Discourse. To avoid derailing the original topic of that discussion though, I thought I'd ask about the specifics of pyhf's situation here.

At the moment I have a branch on pyhf that has the following .github/workflows/binder.yml file:

name: Build Binder Image
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2
    - name: Update jupyter dependencies with repo2docker
      uses: machine-learning-apps/repo2docker-action@0.1

      with:
        DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
        DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
        IMAGE_NAME: "pyhf/binder"
        NOTEBOOK_USER: "jovyan"

Aside first: If you do

$ docker pull pyhf/binder:latest # This is huge, sorry
$ docker run --rm -it -p 8888:8888 pyhf/binder:latest /bin/bash -c 'echo $USER'
matthewfeickert

but it seems that this should be jovyan given the above, not matthewfeickert, no?

</aside>

You had mentioned on Discourse that

The GitHub Action as works today only expects that you do NOT have a .binder/ or binder/ directory at the root of the repo

As pyhf does have a top level binder/ directory with multiple files inside of it, is this a problem that can be dealt with? I'm thinking maybe not as is(?) given that repo2docker will look in /binder first and build according to those config files. If we were to place the Dockerfile that we want Binder to try to use with your action (which would basically be 1 line: FROM pyhf/binder:latest) in binder/ then our other config files would be ignored, and if we place the Dockerfile outside of binder/ then it is ignored. If I have this right, then it seems like this is an impass. If I'm wrong — that's great! If not, can we help?

let me know what part you need help on, (maybe its just getting started with Actions?). Or an example? Let me know how I can help.

pyhf is a huge fan of GitHub Actions, and you can say that we maybe even overuse/abuse them. If you have an example project of yours that is public that would be a help, though maybe the above discussion makes it not relevant at the moment.

cc @lukasheinrich @kratsg

@issue-label-bot
Copy link

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@hamelsmu
Copy link
Collaborator

hamelsmu commented Jun 25, 2020

Re: the username, that was a bug which I just fixed in #27 -- thanks for catching that.

Re: the impasse: @choldgraf has an excellent proposal in #25 that I think would make this whole process easier. We just have to find a way the best way to trigger binder to do a build, which we can do. Let us know if you have any ideas

@hamelsmu
Copy link
Collaborator

hamelsmu commented Jun 26, 2020

@choldgraf I tried this but do not enjoy the user experience compared to building the container and pushing it to your own registry. When things fail when using the API it is not as transparent, also you don't know why the build is taking a long time or what is causing it to hang. I tried using it for this repo, for example and found that the build time is actually quite long (compared to building in Actions) -- not sure why that is.

For right now I have a recommendation on the README for folks to build in Actions with their own registry as a way to cache, but also show an example of deferring to mybinder.org

Happy to hear any feedback or more ideas

oops wrong issue I'll transfer the above comment to the right issue #25

@hamelsmu
Copy link
Collaborator

oops wrong issue I'll transfer the above comment to the right issue #25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants