Building ODK-AI
This document explains how to build the ODK-AI Docker image from source.
Prerequisites
Before building the Docker image, you need:
- Docker installed on your system
- A GitHub token for authentication (required during the build process)
- Git to clone the repository
Building the Image
1. Clone the Repository
2. Set Your GitHub Token
The build process requires a GitHub token to authenticate with GitHub services during the build. You can create a token at https://github.com/settings/tokens.
Export your GitHub token as an environment variable:
Warning
The Makefile will check if this environment variable is set before building. If not set, the build will fail with an error message.
3. Run the Build Command
To build the Docker image locally:
This will create a Docker image named odk-ai:latest
on your local system.
Build Options
The Makefile has several options that can be used:
make build
: Build the Docker image (requires GH_TOKEN)make push
: Build and push the image to DockerHub (as cmungall/odk-ai:latest)make run
: Run the container interactivelymake test
: Run tests in a scratch directory
Customizing the Build
If you need to customize the build, you can modify the following settings in the Makefile:
You can also modify the Dockerfile directly to add additional dependencies or change the configuration.
Building Without Cache
If you want to rebuild everything from scratch (ignoring the cache):
Troubleshooting
- Error: "GH_TOKEN environment variable is not set" - You need to set your GitHub token as described above
- Docker build errors - Make sure Docker is running and you have sufficient permissions
- Network errors during build - Check your internet connection, as the build process downloads packages