Skip to content

Commit

Permalink
fix - compose options
Browse files Browse the repository at this point in the history
  • Loading branch information
Ilevk committed Apr 9, 2024
1 parent e85f6ca commit 798fc2f
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-mlflow
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ RUN apt-get update && apt-get install -y \
&& rm -rf /var/lib/apt/lists/*

RUN pip install -U pip &&\
pip install mlflow psycopg2-binary boto3
pip install mlflow==1.27.0 psycopg2-binary boto3 sqlalchemy==1.4.52

RUN cd /tmp && \
wget https://dl.min.io/client/mc/release/linux-amd64/mc && \
chmod +x mc && \
mv mc /usr/bin/mc
mv mc /usr/bin/mc
54 changes: 27 additions & 27 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ networks:
driver: bridge

volumes:
postgres_data:
driver: local
# postgres_data:
# driver: local
airflow_logs:
driver: local

services:
postgres:
image: docker.io/postgres:12.6
restart: unless-stopped
networks:
- airflow
labels:
io.astronomer.docker: "true"
io.astronomer.docker.cli: "true"
ports:
- 127.0.0.1:5432:5432
volumes:

- postgres_data:/var/lib/postgresql/data

environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres

extra_hosts:
- "host.docker.internal:host-gateway"
# postgres:
# image: docker.io/postgres:12.6
# restart: unless-stopped
# networks:
# - airflow
# labels:
# io.astronomer.docker: "true"
# io.astronomer.docker.cli: "true"
# ports:
# - 127.0.0.1:5432:5432
# volumes:

# - postgres_data:/var/lib/postgresql/data

# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: postgres

# extra_hosts:
# - "host.docker.internal:host-gateway"

scheduler:
image: ml-pipeline_9d9827/airflow:latest
Expand All @@ -59,8 +59,8 @@ services:
io.astronomer.docker: "true"
io.astronomer.docker.cli: "true"
io.astronomer.docker.component: "airflow-scheduler"
depends_on:
- postgres
# depends_on:
# - postgres
environment: *common-env-vars
volumes:
- /home/ubuntu/airflow-tutorial/dags:/usr/local/airflow/dags:z
Expand Down Expand Up @@ -93,7 +93,7 @@ services:
io.astronomer.docker.component: "airflow-webserver"
depends_on:
- scheduler
- postgres
# - postgres
environment: *common-env-vars
ports:
- 127.0.0.1:8080:8080
Expand Down Expand Up @@ -126,8 +126,8 @@ services:
io.astronomer.docker: "true"
io.astronomer.docker.cli: "true"
io.astronomer.docker.component: "airflow-triggerer"
depends_on:
- postgres
# depends_on:
# - postgres
environment: *common-env-vars
volumes:
- /home/ubuntu/airflow-tutorial/dags:/usr/local/airflow/dags:z
Expand Down
2 changes: 1 addition & 1 deletion dags/module/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def transition_model_stage(model_name: str, **context):
eval_metric
]

if current_metric < production_metric:
if current_metric > production_metric:
client.transition_model_version_stage(
current_model.name,
current_model.version,
Expand Down
2 changes: 2 additions & 0 deletions mlflow-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ services:
command: server /data/minio --console-address :9001
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- /home/ubuntu/model_registry:/data/minio
healthcheck:
test: ["CMD", "mc", "ready", "local"]
interval: 5s
Expand Down

0 comments on commit 798fc2f

Please sign in to comment.