replace bash script to docker-compose to build server

This commit is contained in:
2023-03-07 16:33:45 +08:00
parent ec19042d0d
commit 1f86146b12
7 changed files with 28 additions and 16 deletions

18
docker-compose.yaml Normal file
View File

@ -0,0 +1,18 @@
version: '3.7'
services:
mlflow_server:
image: ghcr.io/mlflow/mlflow:v2.1.1
restart: always
ports:
- 5001:5001
volumes:
- ~/python/test_mlflow/service:/home
healthcheck:
test: ["CMD", "curl", "-f", "http://0.0.0.0:5001"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
command: bash -c "apt update && apt install -y curl && mlflow server --host 0.0.0.0 --port 5001 --backend-store-uri sqlite:////home/backend.db --registry-store-uri sqlite:////home/registry.db --artifacts-destination /home/artifacts --serve-artifacts"