-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile-notebook-base
68 lines (64 loc) · 2.1 KB
/
Dockerfile-notebook-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
FROM python:3.11-slim
ARG DASK_VERSION=unset
ENV \
DASK_VERSION=${DASK_VERSION} \
DEBIAN_FRONTEND=noninteractive \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ARG CMAKE_VERSION="3.30.2"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
curl \
libomp-dev \
ninja-build && \
curl -O -L \
https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(arch).sh && \
mkdir /opt/cmake && \
sh cmake-${CMAKE_VERSION}-linux-$(arch).sh --skip-license --prefix=/opt/cmake && \
ln -sf /opt/cmake/bin/cmake /usr/local/bin/cmake && \
pip install --no-cache-dir --prefer-binary \
'aiobotocore[awscli,boto3]>=2.5.0' \
blosc \
bokeh \
dask==${DASK_VERSION} \
'dask-cloudprovider[aws]>=2022.10.0' \
'dask-ml>=2023.3.24' \
distributed==${DASK_VERSION} \
'jupyterlab>=4.0.2' \
lz4 \
numpy \
'pandas>=2.0.0' \
scikit-learn && \
# remove unnecessary file
find \
/usr/local/lib/python3.11/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 '*scikit-learn/tests*' \
-o -wholename '*scikit-learn/*/tests*' \
-o -wholename '*scipy/*/tests*' \
-o -wholename '*tornado/test/*' \
-o -wholename '*/__pycache__/*' \
\) \
-exec rm '{}' '+' && \
find \
/usr/local/lib/python3.11/site-packages \
-type d \
-wholename '*__pycache__*' \
-exec rm -rf '{}' '+' && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["jupyter", "lab", "--ip=0.0.0.0", "--allow-root", "--port=8888"]