-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile_surprise
More file actions
44 lines (40 loc) · 1.24 KB
/
Dockerfile_surprise
File metadata and controls
44 lines (40 loc) · 1.24 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
FROM jupyter/scipy-notebook:python-3.11
USER root
# 配置阿里云镜像源并安装 LightGBM 和 XGBoost 的系统依赖
RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
sed -i 's/ports.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libgomp1 \
&& apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER jovyan
# 安装 Python 库
# 显式指定 numpy<2.0.0 以支持 scikit-surprise
# 强制重装核心库以确保与 NumPy 1.x 的二进制兼容性
# 改用腾讯源以提高稳定性
RUN pip install --no-cache-dir --upgrade pip -i https://mirrors.cloud.tencent.com/pypi/simple && \
pip install --no-cache-dir -i https://mirrors.cloud.tencent.com/pypi/simple \
--force-reinstall \
'jupyterlab' \
'numpy<2.0.0' \
'pandas' \
'scipy' \
'scikit-learn' \
'matplotlib' \
'numexpr' \
'bottleneck' \
'pyarrow' \
'numba' \
'lightgbm' \
'xgboost' \
'mlxtend' \
'nltk' \
'shap' \
'gensim' \
'scikit-surprise' \
'imbalanced-learn'