fix(ml): retire le mot de passe PostgreSQL du compose
This commit is contained in:
@@ -3,3 +3,4 @@ data
|
||||
mlruns
|
||||
mlflow.db*
|
||||
models
|
||||
.env
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
MLFLOW_DB_PASSWORD=change-me
|
||||
@@ -59,6 +59,13 @@ lags/moyennes glissantes, une fuite qui masquerait un surapprentissage.
|
||||
|
||||
## Serveur MLflow (conteneur)
|
||||
|
||||
Premiere utilisation : copier `.env.example` en `.env` et y choisir un mot de passe PostgreSQL
|
||||
(lettres et chiffres uniquement). Le fichier `.env` est ignore par git.
|
||||
|
||||
```
|
||||
Copy-Item .env.example .env
|
||||
```
|
||||
|
||||
Un serveur MLflow (PostgreSQL pour les metadonnees, volume pour les artefacts) se lance avec
|
||||
Docker. Prerequis : Docker Desktop demarre.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ services:
|
||||
image: postgres:16
|
||||
environment:
|
||||
POSTGRES_USER: mlflow
|
||||
POSTGRES_PASSWORD: mlflow
|
||||
POSTGRES_PASSWORD: ${MLFLOW_DB_PASSWORD:?definir MLFLOW_DB_PASSWORD dans ml/.env}
|
||||
POSTGRES_DB: mlflow
|
||||
volumes:
|
||||
- mlflow-db-data:/var/lib/postgresql/data
|
||||
@@ -24,7 +24,7 @@ services:
|
||||
command: >
|
||||
mlflow server
|
||||
--host 0.0.0.0 --port 5000
|
||||
--backend-store-uri postgresql://mlflow:mlflow@mlflow-db:5432/mlflow
|
||||
--backend-store-uri postgresql://mlflow:${MLFLOW_DB_PASSWORD}@mlflow-db:5432/mlflow
|
||||
--artifacts-destination /mlartifacts
|
||||
--serve-artifacts
|
||||
|
||||
|
||||
Reference in New Issue
Block a user