Skip to content

Docker build #22

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

Merged
merged 16 commits into from
Oct 3, 2022
Merged

Docker build #22

merged 16 commits into from
Oct 3, 2022

Conversation

palp
Copy link
Contributor

@palp palp commented Sep 26, 2022

This change adds a Dockerfile to make a consistent build environment easily available.

@salanki
Copy link

salanki commented Sep 26, 2022

Will this build for both python and js?

@palp
Copy link
Contributor Author

palp commented Sep 26, 2022

Will this build for both python and js?

Yeah, and thinking on it, I'd like to exclude those files from the build to ensure they get freshly compiled each run, since the output is checked in - that'd make it easily testable too.

@palp
Copy link
Contributor Author

palp commented Sep 26, 2022

One notable tradeoff here is that I decided on compiling protobuf and grpc rather than relying on binaries/packages - with cached images this seems fine and I think that's the best way to ensure we can have the latest versions of those cleanly.

@palp
Copy link
Contributor Author

palp commented Sep 27, 2022

I've added a workflow to build using this image that uploads the output as an artifact (see https://github.com/Stability-AI/api-interfaces/actions/runs/3132367601); my thinking is we could update #15 to depend on this and remove the build steps, keeping the check-in code, as well as publish the artifacts as a release - all scoped to main. This one can run on push (or PR and push to main) so there's a build check without publish.

We could also publish the output docker image, which could be used in builds like so:
COPY --from=ghcr.io/Stability-AI/api-interfaces:latest /gooseai /src/gooseai
This output image does not contain the build toolchain or source files.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@palp palp requested a review from wbrown September 28, 2022 16:21
@wbrown wbrown merged commit af38e5d into main Oct 3, 2022
@arsenetar arsenetar deleted the palp.docker branch December 15, 2022 09:46
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.

3 participants