Skip to content

Commit

Permalink
Merge pull request #45 from aisingapore/0.4.1-updates
Browse files Browse the repository at this point in the history
0.4.1 updates
  • Loading branch information
Syakyr authored Sep 3, 2024
2 parents b87c4db + cc5ba2b commit 82d01f9
Show file tree
Hide file tree
Showing 23 changed files with 225 additions and 151 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ $ pip install "cookiecutter>=2.2"
$ cookiecutter https://github.com/aisingapore/kapitan-hull
```

> For some reason, macOS would not install the `cookiecutter` CLI. If
> that's the case, you would either need to use `conda install` (if
> you're using Conda), or follow the instructions on the
> [`cookieccutter` guide site][ccutter-inst] using `pipx`.
[ccutter-inst]: https://cookiecutter.readthedocs.io/en/stable/README.html#installation

If you want to run a specific version of Kapitan Hull for compatibility
reasons, you can specify the `-c` parameter for the specific tag/branch
we have:
Expand Down
32 changes: 16 additions & 16 deletions {{cookiecutter.repo_name}}/.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ default:
key: $CI_COMMIT_REF_SLUG
paths:
- ./conda
image:
name: continuumio/miniconda3:24.7.1-0

stages:
- test
Expand All @@ -17,8 +19,6 @@ stages:

test:conda-build:
stage: test
image:
name: continuumio/miniconda3:23.10.0-1
script:
- conda env create -f {{cookiecutter.repo_name}}-conda-env.yaml -p ./conda/{{cookiecutter.repo_name}} -y
rules:
Expand All @@ -38,8 +38,6 @@ test:conda-build:

test:pylint-pytest:
stage: test
image:
name: continuumio/miniconda3:23.10.0-1
before_script:
- source activate ./conda/{{cookiecutter.repo_name}}
- pip install -r dev-requirements.txt
Expand All @@ -66,8 +64,6 @@ test:pylint-pytest:

pages:
stage: deploy-docs
image:
name: continuumio/miniconda3:23.10.0-1
before_script:
- source activate ./conda/{{cookiecutter.repo_name}}
- pip install -r docs-requirements.txt
Expand All @@ -77,12 +73,16 @@ pages:
artifacts:
paths:
- public
only:
- main
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- docs/**/*
- src/**/*
needs:
- test:conda-build
- job: test:conda-build
optional: true

build:data-prep-image:
build:cpu-image:
stage: build
image:
name: gcr.io/kaniko-project/executor:debug
Expand All @@ -108,7 +108,7 @@ build:data-prep-image:
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/{{cookiecutter.repo_name}}-cpu.Dockerfile"
--destination "{{cookiecutter.registry_project_path}}/data-prep:${CI_COMMIT_SHORT_SHA}"
--destination "{{cookiecutter.registry_project_path}}/cpu:${CI_COMMIT_SHORT_SHA}"
rules:
- if: $CI_MERGE_REQUEST_IID
changes:
Expand Down Expand Up @@ -148,7 +148,7 @@ build:model-training-image:
/kaniko/executor
--context "${CI_PROJECT_DIR}"
--dockerfile "${CI_PROJECT_DIR}/docker/{{cookiecutter.repo_name}}-gpu.Dockerfile"
--destination "{{cookiecutter.registry_project_path}}/model-training:${CI_COMMIT_SHORT_SHA}"
--destination "{{cookiecutter.registry_project_path}}/gpu:${CI_COMMIT_SHORT_SHA}"
rules:
- if: $CI_MERGE_REQUEST_IID
changes:
Expand Down Expand Up @@ -182,12 +182,12 @@ build:retag-images:
script:
{%- if cookiecutter.platform == 'onprem' %}
- cat $HARBOR_ROBOT_CREDS_JSON > /root/.docker/config.json
- crane tag {{cookiecutter.registry_project_path}}/data-prep:${CI_COMMIT_SHORT_SHA} ${CI_COMMIT_TAG}
- crane tag {{cookiecutter.registry_project_path}}/model-training:${CI_COMMIT_SHORT_SHA} ${CI_COMMIT_TAG}
- crane tag {{cookiecutter.registry_project_path}}/cpu:${CI_COMMIT_SHORT_SHA} ${CI_COMMIT_TAG}
- crane tag {{cookiecutter.registry_project_path}}/gpu:${CI_COMMIT_SHORT_SHA} ${CI_COMMIT_TAG}
{%- elif cookiecutter.platform == 'gcp' %}
- cat $GCP_SERVICE_ACCOUNT_KEY > /gcp-sa.json
- gcloud container images add-tag "{{cookiecutter.registry_project_path}}/data-prep:${CI_COMMIT_SHORT_SHA}" "{{cookiecutter.registry_project_path}}/data-prep:${CI_COMMIT_TAG}"
- gcloud container images add-tag "{{cookiecutter.registry_project_path}}/model-training:${CI_COMMIT_SHORT_SHA}" "{{cookiecutter.registry_project_path}}/model-training:${CI_COMMIT_TAG}"
- gcloud container images add-tag "{{cookiecutter.registry_project_path}}/cpu:${CI_COMMIT_SHORT_SHA}" "{{cookiecutter.registry_project_path}}/data-prep:${CI_COMMIT_TAG}"
- gcloud container images add-tag "{{cookiecutter.registry_project_path}}/gpu:${CI_COMMIT_SHORT_SHA}" "{{cookiecutter.registry_project_path}}/model-training:${CI_COMMIT_TAG}"
{%- endif %}
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.repo_name}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ To spin up the site on your local machine, you can create a virtual
environment to install the dependencies first:

```bash
$ conda create -n aisg-kh-guide python=3.11.7
$ conda create -n aisg-kh-guide python=3.12.4
$ conda activate aisg-kh-guide
$ pip install -r aisg-context/guide-site/mkdocs-requirements.txt
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,9 @@ MLflow Tracking server.
=== "Linux/macOS"

```bash
conda create -n mlflow-test python=3.11.7
conda create -n mlflow-test python=3.12.4
conda activate mlflow-test
pip install mlflow==2.9.2
pip install mlflow==2.15.1
# Install boto3 or google-cloud-storage packages if
# custom object storage is used
export MLFLOW_TRACKING_USERNAME=<MLFLOW_TRACKING_USERNAME>
Expand All @@ -732,9 +732,9 @@ MLflow Tracking server.
=== "Windows PowerShell"

```powershell
conda create -n mlflow-test python=3.11.7
conda create -n mlflow-test python=3.12.4
conda activate mlflow-test
pip install mlflow==2.9.2
pip install mlflow==2.15.1
# Install boto3 or google-cloud-storage packages if
# custom object storage is used
$MLFLOW_TRACKING_USERNAME=<MLFLOW_TRACKING_USERNAME>
Expand Down
Loading

0 comments on commit 82d01f9

Please sign in to comment.