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

Docker image failing to build #24

Closed
tcamise-gpsw opened this issue Aug 13, 2021 · 4 comments
Closed

Docker image failing to build #24

tcamise-gpsw opened this issue Aug 13, 2021 · 4 comments

Comments

@tcamise-gpsw
Copy link

tcamise-gpsw commented Aug 13, 2021

Hey awesome project here. This is going to save me a lot of time!

Unfortunately, your Docker image is failing to build when I run this in my workflow. It looks like pip is failing to get the wheel for matplotlib, so it then tries to build it from source but the Docker image is missing gcc, make, etc so this fails.

I can't explain why pip is failing to find the whl...or how this is working for you.
However, I am able to work around it by using python:3.8-buster as the base image (instead of slim). This includes all of the necessary build tools and allows me to build matplotlib.

Any ideas on what is going on here?

Ultimately, regardless of the outcome of this, I think the best solution is to pull a pre-built docker image as opposed to building it each time as this would be more reliable and faster. At least, if that's possible...I'm not super well versed with Github actions

@jgehrcke
Copy link
Owner

jgehrcke commented Sep 7, 2021

Ultimately, regardless of the outcome of this, I think the best solution is to pull a pre-built docker image as opposed to building it each time as this would be more reliable and faster.

Fully agree. I had observed various transient errors before during the image build. They are unlikely to happen, but of course as of the law of large numbers a small number of action executions sometimes failed because of these transient issues. Therefore, as of the 'reliability' aspect that you mentioned I had considered doing this anyway. Just was a little lazy so far.

Motivated by your report here I have now done some work in #25, introducing https://hub.docker.com/r/jgehrcke/github-repo-stats-base.

@jgehrcke
Copy link
Owner

jgehrcke commented Sep 7, 2021

I can't explain why pip is failing to find the whl...or how this is working for you.

Btw, that was probably because of a platform-specific build. Maybe you had tried this on a fancy new M1 mac?

@jgehrcke
Copy link
Owner

jgehrcke commented Sep 7, 2021

Note that I have merged #25 and when/if you are using the HEAD of this action then you are testing this change. I am doing so via https://github.com/jgehrcke/ghrs-test -- so, let's maybe incubate this for a bit.

@jgehrcke
Copy link
Owner

#25 reduced the duration for step Build container for action use: '/home/runner/work/_actions/jgehrcke/github-repo-stats/HEAD/Dockerfile from ~2 minutes to ~35 seconds, based on about five samples.

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

No branches or pull requests

2 participants