{"id":20550258,"url":"https://github.com/aisingapore/kapitan-hull","last_synced_at":"2025-03-06T05:44:01.394Z","repository":{"id":211049875,"uuid":"728070796","full_name":"aisingapore/kapitan-hull","owner":"aisingapore","description":"The one-stop shop of a Cookiecutter template to spin up a working AISG project in minutes.","archived":false,"fork":false,"pushed_at":"2025-02-19T13:19:17.000Z","size":9004,"stargazers_count":9,"open_issues_count":15,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-19T14:26:26.284Z","etag":null,"topics":["ai-singapore","cookiecutter","cookiecutter-python","cookiecutter-python3","cookiecutter-template","machine-learning","ml","mlops"],"latest_commit_sha":null,"homepage":"https://aisingapore.github.io/kapitan-hull/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aisingapore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-06T06:57:56.000Z","updated_at":"2025-02-19T06:49:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"21c4ecab-bae8-4c11-8bf9-6e7d26d55c13","html_url":"https://github.com/aisingapore/kapitan-hull","commit_stats":null,"previous_names":["aisingapore/kapitan-hull"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisingapore%2Fkapitan-hull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisingapore%2Fkapitan-hull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisingapore%2Fkapitan-hull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aisingapore%2Fkapitan-hull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aisingapore","download_url":"https://codeload.github.com/aisingapore/kapitan-hull/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242157180,"owners_count":20081036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-singapore","cookiecutter","cookiecutter-python","cookiecutter-python3","cookiecutter-template","machine-learning","ml","mlops"],"created_at":"2024-11-16T02:24:08.733Z","updated_at":"2025-03-06T05:44:01.389Z","avatar_url":"https://github.com/aisingapore.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kapitan Hull\n\n![AI Singapore's Kapitan Hull EPTG Onprem Run:ai Banner](./assets/kapitan-hull-banner.png)\n\n## Table of Contents\n\n- [Kapitan Hull](#kapitan-hull)\n  - [Table of Contents](#table-of-contents)\n  - [Preface](#preface)\n  - [Usage](#usage)\n    - [Input Parameters](#input-parameters)\n    - [Version Control](#version-control)\n\n## Preface\n\nThis repository contains the [`cookiecutter`][ccutter] template for \ngenerating a repository that provides boilerplates touching on the \ndiffering components of an end-to-end ML project. \n\nFor now, this template is dedicated for AI Singapore's on-premise \nenvironment, and where Run:ai is used as the MLOps platform. Other \nplatforms and orchestrators would be integrated to this repository in\nthe near future.\n\n[ccutter]: https://cookiecutter.readthedocs.io/en/stable/\n\n## Usage\n\n### Creating new repository\n\nTo use the template and create a repository, you would need to install\nthe `cookiecutter` CLI, say within a virtual environment and pass the\nURL of this template as an argument, like such:\n\n```bash\n# Ensure that python\u003e=3.10\n$ pip install \"cookiecutter\u003e=2.2\" unidiff\n$ cookiecutter https://github.com/aisingapore/kapitan-hull\n```\n\n\u003e For some reason, macOS would not install the `cookiecutter` CLI. If\n\u003e that's the case, you would either need to use `conda install` (if \n\u003e you're using Conda), or follow the instructions on the\n\u003e [`cookieccutter` guide site][ccutter-inst] using `pipx`.\n\n[ccutter-inst]: https://cookiecutter.readthedocs.io/en/stable/README.html#installation\n\nIf you want to run a specific version of Kapitan Hull for compatibility \nreasons, you can specify the `-c` parameter for the specific tag/branch\nwe have:\n\n```bash\n$ cookiecutter https://github.com/aisingapore/kapitan-hull -c \u003ctag\u003e\n```\n\nYou will then be prompted to provide inputs. These inputs will be used \nto populate different parts of the repository to be generated by\n`cookiecutter`.\n\n### Updating your repository\n\nIf you want to update the repository with updated utilities, \n***push all your changes in your repository first***. After that, you \ncan run this command in the repository:\n\n```bash\n# Add `-c \u003ctag\u003e` for the specific tag/branch\n$ cookiecutter --replay-file cookiecutter.json \\\n    https://github.com/aisingapore/kapitan-hull \\\n    -o .. -f\n```\n\n### Input Parameters\n\n| Parameter                | Detail                                                                                                                           | Default                                                                     | Regex Reference                                                                             |\n|------------------------- |--------------------------------------------------------------------------------------------------------------------------------- |---------------------------------------------------------------------------- |-------------------------------------------------------------------------------------------- |\n| `project_name`           | Name of project that will be the header for the `README.md`. Input to start with alphabet. Only whitespace as separators.        | My Project                                                                  | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L8)  \t|\n| `description`            | A short description of the project that will be populated in `README.md`. Max of 72 characters.                                  | A short description of the project.                                         | NIL                                                                                        \t|\n| `repo_name`              | Name of the repository folder. Input to start with alphabet characters. No whitespaces or underscores are allowed.               | `project_name` where whitespaces and underscores are replaced with hyphens. | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L13) \t|\n| `src_package_name`       | Name of the source code's package under `src`. Input to start with alphabet characters. No whitespaces or hyphens are allowed.   | `repo_name` where hyphens are replaced with underscores.                    | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L16) \t|\n| `src_package_name_short` | The alias for the source code's package. Input to start with alphabet characters. No whitespaces or hyphens are allowed.         | `src_package_name`                                                          | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L19) \t|\n| `platform`               | The platform the project is running on. (Choose between \"on-premise\" or \"Google Cloud Platform\")                                 | `onprem` or `gcp`                                                           | NIL                                                                                         |\n| `orchestrator`           | The orchestrator the project is using. (Choose between \"Run:ai\" or \"No orchestrator\")                                            | `runai` or `none`                                                           | NIL                                                                                         |\n| `proj_name`              | The project name used in by the repository. If you're using Run:ai, this will be the Run:ai project name used by the repository. | `sample-project`                                                            | NIL                                                                                         |\n| `registry_project_path`  | Path of the registry repository for your container images to be located under. Cannot end with a slash character.                | `registry.domain.tld/sample-project/my-project`                             | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L22) \t|\n| `problem_template`       | Initialise the repository with a default problem statement                                                                       | `base` or `cv`                                                              | NIL                                                                                         |\n| `author_name`            | Your alias or project team's name. Relatively arbitrary. No hyphens are allowed.                                                 | `AISG`                                  \t                                  | [Link](https://github.com/aisingapore/kapitan-hull/blob/main/hooks/pre_gen_project.py#L25) \t|\n\n### Version Control\n\nFollowing the creation of your repository, initialise it with Git, push \nit to a remote, and follow its `README.md` document for a full guide on \nits usage.\n\n## Development\n\nTo reduce the size and check the explicit changes between the base\ntemplate and the various problem templates, we opt for the use of diff\nfiles within Kapitan Hull to store the differences within the \nrepository. As such it is essential that developers would know how to \napply patches for development, and regenerate the diff files to commit \nthose changes.\n\n### Applying Diff Patch\n\nYou can apply a specific patch as such:\n\n```bash\npython hooks/pre_prompt.py apply \u003cdiff_file\u003e\n```\n\n### Creating Diff Patch\n\nYou can create a specific patch as such:\n\n```bash\npython extras/generate_diffs.py create \u003calt_file\u003e\n```\n\nThis `\u003calt_file\u003e` refers to the file that is to be committed as a diff\nfile in the `problem-templates/\u003ctemplate\u003e` folder.\n\n\u003e Note: When creating a diff patch, ensure that the base file and the\n\u003e       other file have an extra newline at the end to avoid patching\n\u003e       issues using the scripts.\n\n## Note on AMD GPUs\n\nThose who plan to use AMD GPUs and RoCM can check the `extras/rocm` \nfolder and copy the contents into the `{{cookiecutter.repo_name}}` \nfolder before populating your template. This is experimental, so \nofficial support for this should not be expected any time soon. This is \nalso not added to the main template to reduce the confusion of having \nmultiple file variants for the users.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faisingapore%2Fkapitan-hull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faisingapore%2Fkapitan-hull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faisingapore%2Fkapitan-hull/lists"}