Team Ai
Modelpublic

xxiaomeng/iris-fastapi

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
deploy.yml53 linesDownload Raw Back to workflows
1name: MLOps Pipeline CI2 3on:4  push:5    branches: [main]  # 可根据你实际分支调整6 7jobs:8  train-test:9    name: 🧪 Train and Validate Model10    runs-on: ubuntu-latest11 12    steps:13      - name: ⬇️ Checkout code14        uses: actions/checkout@v315 16      - name: 🐍 Set up Python17        uses: actions/setup-python@v418        with:19          python-version: '3.9'20 21      - name: 📦 Install dependencies22        run: |23          python -m pip install --upgrade pip24          pip install -r requirements.txt25 26      - name: 🏋️‍♀️ Run training script27        run: python app/train_model.py28 29  docker-build:30    name: 🐳 Build & Push Docker Image31    needs: train-test32    runs-on: ubuntu-latest33 34    steps:35      - name: ⬇️ Checkout code36        uses: actions/checkout@v337 38      - name: 🔧 Set up Docker Buildx39        uses: docker/setup-buildx-action@v240 41      - name: 🔐 Login to DockerHub42        uses: docker/login-action@v243        with:44          username: ${{ secrets.DOCKERHUB_USERNAME }}45          password: ${{ secrets.DOCKERHUB_TOKEN }}46 47      - name: 🛠 Build and Push48        uses: docker/build-push-action@v549        with:50          context: .51          file: ./Dockerfile52          push: true53          tags: shinshaw/iris-api:latest