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 bilayersSet the original repository as your upstream
git remote add upstream https://github.com/bilayer-containers/bilayers.git2. Add Your Algorithm Folder¶
Open the project in VS Code
Navigate to
src/bilayers/algorithmsand create a new folder for your algorithmNaming convention: Use
algorithm_inferenceoralgorithm_trainingbased on the taskAdd a
__init__.pyfile to your folderAdd a
config.yamlfile to your folder
Use the provided skeleton as a starting point
config.yaml
citations:
- name: ""
doi: ""
license: ""
description: ""
docker_image:
org:
name:
tag:
platform:
algorithm_folder_name:
exec_function:
name: "generate_cli_command"
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.shPush them to your personal DockerHub repository for validation:
docker build -t your-dockerhub-repo/your-algorithm:tag .docker push your-dockerhub-repo/your-algorithm:tagShare 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 main6. 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