Closed palp closed 1 year ago
Will this build for both python and js?
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.
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.
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.
Kudos, SonarCloud Quality Gate passed!
This change adds a Dockerfile to make a consistent build environment easily available.