Skip to content

Update README.md

Update README.md #1

Workflow file for this run

name: SnowflakeMLOPS
on:
push:
branches:
- main
workflow_dispatch:
jobs:
MachineLearning_training:
runs-on: ubuntu-latest
env:
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWFLAKE_DATABASE: ${{ secrets.SNOWFLAKE_DATABASE }}
SNOWFLAKE_SCHEMA: ${{ secrets.SNOWFLAKE_SCHEMA }}
SNOWFLAKE_ROLE: ${{ secrets.SNOWFLAKE_ROLE }}
SNOWFLAKE_WAREHOUSE: ${{ secrets.SNOWFLAKE_WAREHOUSE }}
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Install Jupyter and Micromamba
run: |
"${SHELL}" <(curl -L micro.mamba.pm/install.sh)
micromamba shell init --shell bash --root-prefix=~/micromamba
export PATH="$HOME/micromamba/bin:$PATH"
micromamba create --name mlops --file environment.yml --yes
- name: Load Dataset
run: |
micromamba run -n mlops jupyter nbconvert --to notebook --execute --FilesWriter.build_directory=. "${GITHUB_WORKSPACE}/Notebooks/1_load_data.ipynb"
- name: Feature Engineering
run: |
micromamba run -n mlops jupyter nbconvert --to notebook --execute --FilesWriter.build_directory=. "${GITHUB_WORKSPACE}/Notebooks/feature_engineering.ipynb"
- name: Train and Save Model
run: |
micromamba run -n mlops jupyter nbconvert --to notebook --execute --FilesWriter.build_directory=. "${GITHUB_WORKSPACE}/Notebooks/train_save_model.ipynb"
build_and_push_docker:
needs: MachineLearning_training
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Log in to Docker Hub
run: echo "${{ secrets.DOCKERPASSWORD }}" | docker login -u "${{ secrets.DOCKERUSERNAME }}" --password-stdin
- name: Build Docker image
run: docker build -t ${{ secrets.DOCKERUSERNAME }}/snowflakeadprediction:latest .
- name: Push Docker image
run: docker push ${{ secrets.DOCKERUSERNAME }}/snowflakeadprediction:latest