A GitHub repository template with Docker, pre-commit hooks, and CI/CD
A GitHub repository template that uses Docker for easy deployment and testing, with pre-commit hooks and GitHub Actions CI/CD included.
TLDR: Search for
todoand update all occurrences to your desired name.
- Change LICENSE if necessary
- Modify .pre-commit-config.yaml according to your needs
- Modify/add GitHub workflow status badges in README.md
-
Fill in all
todo-*placeholders directly in .env.example and commit — these are project-level constants, not secretsPlaceholder Description todo-docker-userYour Docker Hub account username todo-base-imageBase image the Dockerfile builds from (e.g. nvidia/cuda:13.0.0-cudnn-devel-ubuntu24.04)todo-image-nameName of the image you are building todo-image-userDefault user inside the image, used to determine the home folder -
Copy .env.example to
.envand add any user-specific secrets or local overrides:cp .env.example .env
.envis gitignored and will NOT be committed — it is the right place for secrets and per-user values. It is loaded automatically by docker compose. -
Modify the service name from
todo-service-nameto your service name in docker-compose.yml, add additional volume mounting options such as dataset directories -
Update Dockerfile and .dockerignore — the existing Dockerfile includes screen & tmux config, oh-my-zsh, cmake, and other basic tools
-
Run scripts to build, test, and push:
Script Action build.sh Build and test the image locally (uses buildxfor multi-arch)run_container.sh Run and test a built image ( docker compose up -dalso works)push.sh Push the multi-arch image to Docker Hub The service mounts the entire repository onto
CODE_FOLDERinside the container — modifications inside are reflected outside, useful for VS Code remote development.
bash scripts/dev_setup.sh- Supports
amd64andarm64Docker images. To add other architectures, modify build.sh and docker-compose.yml. - The build stage has no GPU access. If your dependencies require GPU, build them inside a running container and commit to the final image.