import mlflow
from mlflow.models import infer_signature
from sklearn.linear_model import LinearRegression
from sklearn.datasets import make_regression
from sklearn.metrics import mean_squared_error
# 1. Set tracking URI to local MLflow server
mlflow.set_tracking_uri("http://host.docker.internal:5555")
print("📡 Tracking to:", mlflow.get_tracking_uri())
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
fastapi: | |
image: docker.io/xxxxxx/fastapi:dev. | |
build: | |
context: "./" | |
dockerfile: "Dockerfile" | |
ports: | |
- "8000:8000" | |
streamlit: |
# Step 0 / Cell 0
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.datasets import load_iris
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score, confusion_matrix, classification_report, r2_score, mean_squared_error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: argoproj.io/v1alpha1 | |
kind: Application | |
metadata: | |
name: vote-prod | |
namespace: argocd | |
spec: | |
destination: | |
namespace: prod | |
server: https://kubernetes.default.svc | |
project: default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM maven:3.9.6-eclipse-temurin-17 AS build | |
WORKDIR /app | |
COPY . . | |
RUN mvn package -DskipTests | |
FROM eclipse-temurin:17-jre-noble as package | |
WORKDIR /app | |
COPY --from=build /app/target/sysfoo-*.jar ./sysfoo.jar | |
EXPOSE 8080 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker_bnp: | |
runs-on: ubuntu-latest | |
needs: package | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Build and test Docker image | |
run: | | |
COMMIT_HASH=$(echo ${{ github.sha }} | cut -c1-7) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
job: [unit-test, sca, sbom] | |
name: Run ${{ matrix.job }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Compile sysfoo app | |
run: mvn compile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: |
NewerOlder