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

Workflow for building container image #106

Merged
merged 15 commits into from
Nov 13, 2024
Merged

Conversation

gvegayon
Copy link
Member

@gvegayon gvegayon commented Nov 5, 2024

This pull request introduces a new GitHub Actions workflow for building Docker images and refactors the Dockerfiles to separate dependencies from the main application. The key changes include the creation of a workflow file, modifications to the Containerfile, and the addition of a new Containerfile.dependencies.

Workflow and Dockerfile changes:

  • New GitHub Actions workflow:

    • Added .github/workflows/containers.yaml to automate the building and pushing of Docker images. This workflow includes steps to checkout code, retrieve commit messages, determine branch names, and handle Docker caching and login.
  • Refactoring Dockerfiles:

    • Modified Containerfile to use a pre-built dependencies image from the container registry, allowing for faster builds and better separation of concerns.
    • Added a new Containerfile.dependencies to define the base image with all necessary dependencies, including Python, R, and CMake installations.

Important

This depends on the cfa-cdcgov runners, which are currently not set for this repository. If you don't want to depend on the cdcgov runner (for now), we can change this to use ghcr.io instead.

@gvegayon gvegayon linked an issue Nov 5, 2024 that may be closed by this pull request
@gvegayon gvegayon marked this pull request as ready for review November 5, 2024 17:26
@jkislin
Copy link

jkislin commented Nov 6, 2024

@gvegayon @damonbayer you've been setup with two instances of cfa-cdcgov for this repository.
Please let me know if you experience issues

Important

Please do not invite non-cdc users to be admins of this repository, or to allow non-cdc users to push directly to branches that trigger CI/CD.

@gvegayon
Copy link
Member Author

gvegayon commented Nov 6, 2024

@gvegayon @damonbayer you've been setup with two instances of cfa-cdcgov for this repository. Please let me know if you experience issues

Important

Please do not invite non-cdc users to be admins of this repository, or to allow non-cdc users to push directly to branches that trigger CI/CD.

@damonbayer and @dylanhmorris, aren't there explicit rules in the repo for that?

attn @zsusswein and @natemcintosh

@gvegayon
Copy link
Member Author

gvegayon commented Nov 6, 2024

The thing is runnning! But there's an issue with pyarrow. Will investigate.

@gvegayon gvegayon requested a review from damonbayer November 7, 2024 15:52
@gvegayon
Copy link
Member Author

gvegayon commented Nov 7, 2024

Hey @damonbayer! It turns out that python 3.13 breaks the container (b/c of some stuff with pyarrow). Downgrading to Python 3.12 works.

Containerfile.dependencies Outdated Show resolved Hide resolved
@natemcintosh
Copy link

Hey @damonbayer! It turns out that python 3.13 breaks the container (b/c of some stuff with pyarrow). Downgrading to Python 3.12 works.

I also had some issues with pyarrow when upgrading to 3.13. I was able to fix them by updating from pyarrow 17 to 18.

@damonbayer
Copy link
Collaborator

@gvegayon I update pyarrow. Please try Python 3.13 again, if you don't mind.

@gvegayon
Copy link
Member Author

gvegayon commented Nov 7, 2024

@gvegayon I update pyarrow. Please try Python 3.13 again, if you don't mind.

Running again!

@gvegayon
Copy link
Member Author

gvegayon commented Nov 7, 2024

Yeah @damonbayer and @natemcintosh, docker is not happy with the change. I would recommend going back to python 3.12 (if you can't think of a straight forward solution) and adding a new issue indicating the need to move to 3.13.

@natemcintosh
Copy link

natemcintosh commented Nov 7, 2024

If Damon merged the change to 3.13 into main, did that change also get merged into this branch?. Otherwise this branch will still be trying to use pyarrow 17, no?

@gvegayon
Copy link
Member Author

gvegayon commented Nov 7, 2024

If Damon merged the change to 3.13 into main, did that change also get merged into this branch?. Otherwise this branch will still be trying to use pyarrow 17, no?

I don't think so. GHA workflows triggered by PRs run on a merge (see here). I can try actively merging main into the Branch, but I think it will be the same thing.

@gvegayon
Copy link
Member Author

gvegayon commented Nov 7, 2024

@natemcintosh and @damonbayer, it's passing now! I'm still learning how PR-triggered workflows work, but at least is working!

@damonbayer damonbayer merged commit cb4609d into main Nov 13, 2024
3 checks passed
@damonbayer damonbayer deleted the 44-containerize-pyrenew-hew branch November 13, 2024 15:27
@damonbayer
Copy link
Collaborator

Thanks @gvegayon!

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 this pull request may close these issues.

Containerize pyrenew-hew
4 participants