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
# Use python alpine base image | |
FROM python:3.11-alpine3.17 | |
# Set working directory | |
WORKDIR /app | |
# Copy source code to container | |
COPY . /app | |
# Install dependencies |
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
networks: | |
custom: | |
driver: bridge | |
services: | |
app: | |
image: initcron/petclinic:dev | |
build: | |
context: . | |
dockerfile: Dockerfile.multistage.v1 |
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: Trivy Vulnerability Scan | |
on: | |
push: | |
branches: [ main, master ] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
trivy: |
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 schoolofdevops/maven:spring | |
WORKDIR /app | |
COPY . . | |
RUN mvn spring-javaformat:apply && \ | |
mvn package -DskipTests && \ | |
mv target/spring-petclinic-2.3.1.BUILD-SNAPSHOT.jar /run/petclinic.jar |
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) |
NewerOlder