Skip to content

Update model.py

Update model.py #17

Workflow file for this run

name: CI/CD Pipeline for Clustering App
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout code from the repository
- name: Checkout code
uses: actions/checkout@v2
# Set up Python 3.9 environment
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
# Install system dependencies for building Cython extensions
- name: Install build dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
# Upgrade pip and install build tools
- name: Upgrade pip and install build tools
run: |
pip install --upgrade pip setuptools wheel
# Install dependencies from requirements.txt
- name: Install dependencies
run: pip install -r requirements.txt
# Build Docker image
- name: Build Docker image
run: docker build -t clustering-app .
# Push Docker image to DockerHub
- name: Push Docker image to DockerHub
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
docker tag clustering-app ${{ secrets.DOCKER_USERNAME }}/clustering-app:latest
docker push ${{ secrets.DOCKER_USERNAME }}/clustering-app:latest