File size: 1,335 Bytes
92b63f0
 
 
 
 
 
 
 
 
 
 
 
 
 
3d70144
92b63f0
 
 
 
 
 
 
 
 
 
 
 
 
3d70144
 
92b63f0
 
 
 
 
 
 
 
 
 
 
 
 
3d70144
 
92b63f0
 
 
 
 
 
3d70144
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
version: "3.8"

services:
  deployment:
    build:
      context: .
      dockerfile: Dockerfile
    command: >
      bash -c "
      zenml integration install mlflow -y &&
      zenml experiment-tracker register mlflow_tracker_customer_churn_new --flavor=mlflow &&
      zenml model-deployer register mlflow_customer_churn_new --flavor=mlflow &&
      zenml stack register mlflow_stack_customer_churn_new -a default -o default -d mlflow -e mlflow_tracker_customer_churn_new --set &&
      zenml stack set mlflow_stack_customer_churn_new &&
      python3 run_pipeline.py &&
      python3 run_deployment.py
      "
    volumes:
      - .:/app
    working_dir: /app
    restart: on-failure

  fastapi_service:
    build:
      context: .
      dockerfile: Dockerfile
    command: ["uvicorn", "backend.fastapi_app:app", "--host", "0.0.0.0", "--port", "8001"]
    depends_on:
      deployment:
        condition: service_healthy
    volumes:
      - .:/app
    working_dir: /app
    ports:
      - "8001:8001"
    restart: on-failure

  streamlit:
    build:
      context: .
      dockerfile: Dockerfile
    command: ["streamlit", "run", "frontend/main.py"]
    depends_on:
      fastapi_service:
        condition: service_healthy
    volumes:
      - .:/app
    working_dir: /app
    ports:
      - "8501:8501"
    restart: on-failure