mirror of
https://github.com/Hestia-Homes/ML.git
synced 2026-06-30 13:10:43 +00:00
commit
ade3336f00
2 changed files with 52 additions and 9 deletions
46
.github/workflows/MLMonitoringDevPipeline.yml
vendored
Normal file
46
.github/workflows/MLMonitoringDevPipeline.yml
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
name: Deployment for Dev Model
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: [ 'model#dev#*' ]
|
||||||
|
|
||||||
|
permissions: write-all
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
Register-Prediction-Image-Dev:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install packages to retrieve artifacts
|
||||||
|
run: |
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
|
||||||
|
|
||||||
|
- name: Retrieve artifacts (dvc.lock)
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }}
|
||||||
|
run: |
|
||||||
|
cd modules/ml-pipeline/src/pipeline/src
|
||||||
|
dvc pull -r dev
|
||||||
|
|
||||||
|
- name: Build Prediction docker image (TODO - NEED LAMBDA IMAGE, need to add version from gto registry)
|
||||||
|
run: |
|
||||||
|
cd modules/ml-pipeline/src/pipeline/
|
||||||
|
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
||||||
|
docker build . --file Prediction.Dockerfile --tag ${REGISTER_MODEL_NAME}
|
||||||
|
|
||||||
|
- name: ECR Login - Dev
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "LOGIN TO ECR"
|
||||||
|
|
||||||
|
- name: Push Prediction image to ECR - Dev
|
||||||
|
env:
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }}
|
||||||
|
run: |
|
||||||
|
echo "PUSH TO ECR"
|
||||||
15
.github/workflows/MLPipelinePostMerge.yml
vendored
15
.github/workflows/MLPipelinePostMerge.yml
vendored
|
|
@ -176,9 +176,6 @@ jobs:
|
||||||
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
|
pip install -r modules/ml-pipeline/src/pipeline/src/requirements/version_control/requirements.txt
|
||||||
|
|
||||||
- name: Register Model
|
- name: Register Model
|
||||||
env:
|
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.ROBOT_AWS_ACCESS_KEY_ID }}
|
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.ROBOT_AWS_SECRET_ACCESS_KEY }}
|
|
||||||
run: |
|
run: |
|
||||||
|
|
||||||
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
REGISTER_MODEL_NAME=$(echo ${{ github.event.pull_request.head.ref }} | awk -F"-" '{print $1}')
|
||||||
|
|
@ -206,13 +203,13 @@ jobs:
|
||||||
git tag -a ${new_tag} -m "Assigning stage dev to artifact ${REGISTER_MODEL_NAME} version ${latest_version}"
|
git tag -a ${new_tag} -m "Assigning stage dev to artifact ${REGISTER_MODEL_NAME} version ${latest_version}"
|
||||||
git push origin ${new_tag}
|
git push origin ${new_tag}
|
||||||
|
|
||||||
# git checkout master
|
git checkout master
|
||||||
# git fetch --all
|
git fetch --all
|
||||||
|
|
||||||
# gto show > MODEL_REGISTRY.md
|
gto show > MODEL_REGISTRY.md
|
||||||
# git add .
|
git add .
|
||||||
# git commit -m "Update Registry"
|
git commit -m "Update Registry"
|
||||||
# git push origin master
|
git push origin master
|
||||||
|
|
||||||
|
|
||||||
Register-Prediction-Image-Dev:
|
Register-Prediction-Image-Dev:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue