1. Fork bilayers repository¶
Go to Bilayers GitHub Repo
- Click the Fork button on top-right corner
- Clone your forked repository to your local system
git clone https://github.com/your-username/bilayers.git
cd bilayers
- Set the original repository as your upstream
git remote add upstream https://github.com/bilayer-containers/bilayers.git
2. Add Your Algorithm Folder¶
- Open the project in VS Code
- Navigate to
src/algorithms
and create a new folder for your algorithm - Naming convention: Use
algorithm_inference
oralgorithm_training
based on the task - Add a
__init__.py
file to your folder - Add a
config.yaml
file to your folder
Use the provided skeleton as a starting point
config.yaml
citations:
algorithm:
- name: ""
doi: ""
license: ""
description: ""
docker-image:
org:
name:
tag:
platform:
algorithm_folder_name:
exec_function:
name: "generate_cli_command"
script:
module:
cli_command:
hidden_args:
inputs:
outputs:
parameters:
display_only:
- Refer to the Understanding config.yaml for usage of each components
- Check the Choosing a Base Docker Image guide for algorithm docker image selection
3. Update CI/CD Configuration¶
- To enable automated interface generation and testing, update the following files:
scripts/build_docker.sh
: Edit your algorithm name toline #7
:ALGORITHM_NAMES=(“your_algorithm”)
scripts/validate.sh
: Edit your algorithm name toline #6
:ALGORITHM_NAMES=(“your_algorithm”)
4. Test on your end¶
- Build and test your Docker images locally.
./scripts/build_docker.sh
- Push them to your personal DockerHub repository for validation:
docker build -t your-dockerhub-repo/your-algorithm:tag .
docker push your-dockerhub-repo/your-algorithm:tag
- Share your work with the community by submitting a pull request to Bilayers
5. Commit your changes¶
git add .
git commit -m "[Add] new algorithm: algorithm_name"
git push origin main
6. Submit a Pull request¶
- Open a PR to the main Bilayers repository. Provide a clear description of your algorithm and its usage
7. Review and Approval¶
- The Bilayers team will review your PR
- Upon approval: Your algorithm will be added to the main repository. Docker images will be published to the Bilayers DockerHub for community use