Spaces:
Sleeping
Sleeping
Download Dockerfile from Frederic-CellNum/mlflow_fraud: direct link, hf CLI and curl.
- Browser
- Download file 1.15 kB
-
https://huggingface.co/spaces/Frederic-CellNum/mlflow_fraud/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Frederic-CellNum/mlflow_fraud/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Frederic-CellNum/mlflow_fraud/resolve/main/Dockerfile
1.15 kB
| FROM python:3.11-slim | |
| RUN pip install mlflow==2.19.0 psycopg2-binary boto3 | |
| USER root | |
| RUN mkdir -p /mlflow/artifacts | |
| RUN useradd -m -u 1000 mlflow | |
| RUN chown -R mlflow:mlflow /mlflow | |
| USER mlflow | |
| RUN pip install --upgrade pip | |
| RUN pip install --no-cache-dir psycopg2-binary boto3 | |
| EXPOSE 7860 | |
| # ── ENV (surchargeables via HF Spaces Settings → Variables/Secrets) ──────── | |
| ENV MLFLOW_BACKEND_STORE_URI="sqlite:////mlflow/mlflow.db" | |
| # Bucket HF (S3-compatible) — namespace dans l'endpoint, bucket seul dans l'URI | |
| ENV MLFLOW_S3_ENDPOINT_URL="https://s3.hf.co/Frederic-CellNum" | |
| ENV MLFLOW_ARTIFACT_ROOT="s3://mlflow_fraud-storage/" | |
| ENV AWS_DEFAULT_REGION="us-east-1" | |
| ENV AWS_ACCESS_KEY_ID="" | |
| ENV AWS_SECRET_ACCESS_KEY="" | |
| # Requis pour les versions récentes de boto3 — la passerelle HF ne gère pas | |
| # les checksums trailing CRC32 (aws-chunked) envoyés par défaut | |
| ENV AWS_REQUEST_CHECKSUM_CALCULATION="when_required" | |
| ENV AWS_RESPONSE_CHECKSUM_VALIDATION="when_required" | |
| CMD mlflow server --host 0.0.0.0 \ | |
| --port 7860 \ | |
| --backend-store-uri "$MLFLOW_BACKEND_STORE_URI" \ | |
| --default-artifact-root "$MLFLOW_ARTIFACT_ROOT" |