Skip to content

Commit

Permalink
feat: add new containers to docker compose files
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedAliBouhaouala committed Oct 28, 2024
1 parent 676b411 commit 617622c
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ TFLC_REPO_ID=Hexastack/tflc
INTENT_CLASSIFIER_REPO_ID=Hexastack/intent-classifier
SLOT_FILLER_REPO_ID=Hexastack/slot-filler
NLU_ENGINE_PORT=5000
MLFLOW_SERVER_PORT=5002
POSTGRES_DB_PORT=5432
POSTGRES_USER=postgres
POSTGRES_PASSWORD=postgres
POSTGRES_DB=mlflow_db
BACKEND_STORE_URI=postgresql://postgres:postgres@mlflow_postgres:5432/mlflow_db
ARTIFACT_STORE_URI=./mlruns

# Frontend (Next.js)
APP_FRONTEND_PORT=8080
Expand Down
19 changes: 19 additions & 0 deletions docker/docker-compose.nlu.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,22 @@ services:
pull_policy: build
ports:
- ${NLU_ENGINE_PORT}:5000
mlflow-server:
build:
context: ../nlu/docker
dockerfile: Dockerfile
pull_policy: build
ports:
- ${MLFLOW_SERVER_PORT}:5000

mlflow_postgres:
image: bitnami/postgresql
container_name: postgres_db
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- ${POSTGRES_DB_PORT}:${POSTGRES_DB_PORT}
27 changes: 27 additions & 0 deletions docker/docker-compose.nlu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,35 @@ services:
retries: 5
start_period: 10s

mlflow_postgres:
image: bitnami/postgresql
container_name: postgres_db
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=mlflow_db
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- ${POSTGRES_DB_PORT}:${POSTGRES_DB_PORT}

mlflow_server:
restart: always
image: hexastack/hexabot-mlflow-server:latest
container_name: mlflow_server
environment:
- BACKEND_STORE_URI=${BACKEND_STORE_URI} # Connection string to Postgres
- ARTIFACT_STORE_URI=${ARTIFACT_STORE_URI} # Local directory for storing artifacts
ports:
- ${MLFLOW_SERVER_PORT}:5000 # Expose MLflow UI
volumes:
- mlruns:/mlruns # Mount local directory for MLflow artifacts
command: mlflow server --backend-store-uri postgresql://postgres:postgres@mlflow_postgres:5432/mlflow_db --default-artifact-root ./mlruns --host 0.0.0.0 --port 5000

volumes:
nlu-data:
postgres_data:
mlruns:

networks:
nlu-network:

0 comments on commit 617622c

Please sign in to comment.