-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
94 lines (76 loc) · 2.44 KB
/
Dockerfile
File metadata and controls
94 lines (76 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Use Python 3.9 to match TensorFlow 2.20 and your pins
FROM python:3.10
ENV DEBIAN_FRONTEND=noninteractive \
PIP_NO_CACHE_DIR=1 \
PYTHONDONTWRITEBYTECODE=1 \
# Helpful for rpy2 <-> R discovery, though usually auto-detected
R_HOME=/usr/lib/R \
RPY2_CFFI_MODE=ABI
# ---- System packages ----
# - r-base + r-base-dev for rpy2 (pulled by aif360[all])
# - libtirpc-dev fixes the exact link error you hit (-ltirpc)
# - cairo dev libs used by igraph[cairo]/cairocffi (pulled by [all])
# - toolchain + BLAS/LAPACK for scientific stack
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
gfortran \
cmake \
swig \
pkg-config \
r-base \
r-base-dev \
libtirpc-dev \
libcairo2 \
libcairo2-dev \
libicu-dev \
libpcre2-dev \
zlib1g-dev \
libbz2-dev \
liblzma-dev \
libzstd-dev \
libcurl4-openssl-dev \
libgomp1 \
libgfortran5 \
libstdc++6 \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# ---- Python dependencies ----
# Keep your original pins; add pyarrow/hydra; install aif360[all] after system deps
RUN python -m pip install --upgrade pip setuptools wheel && \
pip install \
numpy==1.23.5 \
scipy==1.9.3 \
pandas==1.5.3 \
scikit-learn==1.2.2 \
pyarrow==15.0.2 \
lightgbm==4.6.0 \
"flaml[automl]" && \
pip install 'aif360[all]==0.6.1' && \
pip install \
mlflow==2.22.0 \
hyperopt \
fairlearn \
mapie==0.9.2 \
hydra-core==1.3.2 \
omegaconf==2.3.0 && \
# CPU-only Torch; change to CUDA wheels if you’ll use GPU
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu && \
# Optional extras you had
pip install tensorflow==2.20.0 inFairness aix360
# ✅ Install AIX360 for explainability
RUN pip install --no-cache-dir aix360
RUN pip install --no-cache-dir \
"git+https://github.com/humancompatible/explain.git@7406b59"
RUN pip install --no-cache-dir \
"git+https://github.com/humancompatible/detect.git@93f8f32"
RUN pip install --no-cache-dir \
"git+https://github.com/humancompatible/repair.git@3d08622a943df5f697bd0ec1b1f061ac99e1cdbf"
# Optional: create output dirs used by the repo's examples/plots
RUN mkdir -p /app/plots /app/data
WORKDIR /app
COPY dataset1M.parquet /data/
#COPY model.pkl /data/
COPY config.yaml .
COPY data_helper.py .
COPY run_mlflow.py .
ENTRYPOINT ["python", "run_mlflow.py"]