Earn 50,400 ($504.00)
Build a Docker image with GitHub Actions
Bounty Description
Hi! Thank you for your interest! I need help building and deploying a Docker image from an open source codebase.
I need help from someone with strong experience with Docker image build and deployment.
Problem Description
I want to do a custom build of cohere-toolkit using GitHub Actions.
Why use GitHub Actions for this? I don't want to build locally because it is a long build, it needs to be managed by the version control system, and there is already a well-defined workflow in this repository that can be used to build the images as a "Standalone" or as separate "Frontend" and "Backend" images. If you open the repository on Github you can see workflows for building and pushing the image based on the latest source code in the repo. That's what I want to do.
My goal is to be able to deploy them to another container host, and I am stuck on just getting the image to build and push to a registry.
Repository: https://github.com/cohere-ai/cohere-toolkit
There is a lot of documentation focused on how to do docker run
to quickly use the pre-built image. Those instructions work but I need to be able to customize the Frontend and Backend, and push that container image.
There is a nice set of GitHub Workflows defined in .github, I think this is an ideal way to build an image (and push it to the GitHub container registry, so I can deploy it to any docker image host).
My problem is, when I try to build it locally or in GitHub Workflow, I get errors, notably missing module community
— which probably means I misconfigured it when I used make first-run
. Read the Makefile to understand how the backend configuration.yaml and secrets.yaml are set up. There are both environment variables and feature flags that affect the community installation. (the "Community" modules are separated to make the build faster, I don't think I need them necessarily, so you can probably set INSTALL_COMMUNITY_DEPS=false and make the build faster.)
So I need your help to get this built and deployed.
I think this should be relatively easy for someone who is experienced with Docker container deployment.
One specific problem I am having is I get an error like missing module community
during the migration which I think means I am setting something wrong in terms of file paths, which might be fixed just with Environment variables or other configuration.
It seems like it should not require any significant changes to the codebase itself, although looking through the github issues for the project I see some people do have to make some adjustments. I am available to help chat about it and test.
Acceptance Criteria
You can fork the open source repo and get the build to work. I will deploy it to myself to verify the instructions work and deploy the custom build.
-
Please document step by step instructions for me to
docker build
the frontend and backend (either separately using the two different Dockerfiles or as the third "Standalone"standalone.Dockerfile
option). -
Goal: When you
docker run
that image it contains the text "hello world" in the title of the page, and I can deploy that on any container host like Render.com or Digital Ocean.
Technical Details
The project readme is relatively well organized with documentation:
Readme: https://github.com/cohere-ai/cohere-toolkit
Docs: https://github.com/cohere-ai/cohere-toolkit/tree/main/docs
Key things to notice:
There are three Dockerfiles involved, At the root of the project there is a main Dockerfile, then there is a Frontend and the Backend.
Authentication can stay disabled for this, no auth is needed.
There are options for multiple model providers, I just want to use the default cohere hosted option.
See: https://github.com/cohere-ai/cohere-toolkit/blob/main/docs/command_model_providers.md
Codebase: https://docs.cohere.com/docs/cohere-toolkit
Walkthrough: https://github.com/cohere-ai/cohere-toolkit/blob/main/docs/walkthrough/walkthrough.md
Troubleshooting: https://github.com/cohere-ai/cohere-toolkit/blob/main/docs/troubleshooting.md
Standalone Dockerfile: https://github.com/cohere-ai/cohere-toolkit/blob/main/standalone.Dockerfile
How to guides: https://github.com/cohere-ai/cohere-toolkit/blob/main/docs/how_to_guides.md
Setup: https://github.com/cohere-ai/cohere-toolkit/blob/main/docs/setup.md
I can provide API keys and resources to build.