-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile-cluster-base
83 lines (73 loc) · 2.33 KB
/
Dockerfile-cluster-base
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
ARG PYTHON_VERSION=unset
FROM python:${PYTHON_VERSION}-slim
ARG CMAKE_VERSION="3.31.3"
ARG DASK_VERSION=unset
ARG PYTHON_VERSION=unset
ENV \
DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8
RUN --mount=type=bind,source=bin,target=/build-bin \
<<EOF
apt-get update
apt-get install -y --no-install-recommends \
build-essential \
curl \
libomp-dev
/build-bin/install-cmake "${CMAKE_VERSION}"
python -m pip install \
--no-cache-dir \
--prefer-binary \
blosc \
bokeh \
"dask==${DASK_VERSION}" \
'dask-ml>=2024.4.4' \
"distributed==${DASK_VERSION}" \
lz4 \
numpy \
'pandas>=2.0.0' \
scikit-learn
# remove unnecessary files
find \
/usr/local/lib/python${PYTHON_VERSION}/site-packages \
-type f \
\( \
-name '*.c' \
-o -name '*.cc' \
-o -name '*.cpp' \
-o -name '*.h' \
-o -name '*.hpp' \
-o -wholename '*bokeh/sampledata/*' \
-o -wholename '*dask/*tests/*' \
-o -wholename '*joblib/test/*' \
-o -wholename '*llvmlite/tests/*' \
-o -wholename '*numba/*tests/*' \
-o -wholename '*numpy/*tests/*' \
-o -wholename '*pandas/tests*' \
-o -wholename '*pandas/*/tests/*' \
-o -wholename '*psutil/tests/*' \
-o -wholename 'pyarrow/_pyarrow_cpp_tests*' \
-o -wholename '*scikit-learn/tests*' \
-o -wholename '*scikit-learn/*/tests*' \
-o -wholename '*sklearn/tests*' \
-o -wholename '*sklearn/*/tests*' \
-o -wholename '*scipy/*/tests*' \
-o -wholename '*sparse/*/tests/*' \
-o -wholename '*toolz/tests/*' \
-o -wholename '*tornado/test/*' \
-o -wholename '*zict/tests/*' \
-o -wholename '*/__pycache__/*' \
\) \
-exec rm '{}' '+'
find \
/usr/local/lib/python${PYTHON_VERSION}/site-packages \
-type d \
-wholename '*__pycache__*' \
-exec rm -rf '{}' '+'
# clean apt-get files
apt-get clean
apt-get purge -y --auto-remove
rm -rf /var/lib/apt/lists/*
# clean other files
rm -rf ~/.cache
EOF