leonsimon23 commited on
Commit
54cdee5
·
verified ·
1 Parent(s): 2d443ea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -3
Dockerfile CHANGED
@@ -25,16 +25,23 @@ RUN apt-get update && apt-get install -y \
25
  liblapack-dev \
26
  pandoc \
27
  pkg-config \
28
- # 移除了 'pandoc-citeproc',因为它通常已包含在 pandoc 中或不再单独提供。
29
  python3 \
30
  python3-pip \
31
  python3-dev \
32
  build-essential \
 
 
 
33
  && rm -rf /var/lib/apt/lists/*
34
 
35
- # prophet 包安装 Python 依赖
36
  # 注意:Prophet R 包在内部调用了 Python 的 Prophet 库
37
- RUN pip3 install pystan fbprophet
 
 
 
 
 
38
 
39
  # 安装所有必需的 R 包
40
  # 分开安装一些可能相互依赖或安装耗时的包,增加稳定性
 
25
  liblapack-dev \
26
  pandoc \
27
  pkg-config \
 
28
  python3 \
29
  python3-pip \
30
  python3-dev \
31
  build-essential \
32
+ # 添加 Python 虚拟环境和 wheel 支持,有时可以加速安装或解决依赖问题
33
+ python3-venv \
34
+ python3-wheel \
35
  && rm -rf /var/lib/apt/lists/*
36
 
37
+ # 升级 pip 并为 prophet 包安装 Python 依赖
38
  # 注意:Prophet R 包在内部调用了 Python 的 Prophet 库
39
+ # 我们将 pystan fbprophet 分开安装,并尝试指定一个稳定版本
40
+ # 例如,fbprophet 0.7.1 是一个广泛使用的稳定版本,它通常与 pystan < 2.0 兼容
41
+ RUN pip3 install --upgrade pip
42
+ RUN pip3 install pystan==2.19.1.1 # Pin a specific stable pystan version
43
+ RUN pip3 install fbprophet==0.7.1 # Pin a specific stable fbprophet version
44
+ # 如果 0.7.1 仍然有问题,可以尝试 0.6 或 0.5
45
 
46
  # 安装所有必需的 R 包
47
  # 分开安装一些可能相互依赖或安装耗时的包,增加稳定性