leonsimon23 commited on
Commit
307d7bd
·
verified ·
1 Parent(s): 54cdee5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -3
Dockerfile CHANGED
@@ -29,7 +29,6 @@ RUN apt-get update && apt-get install -y \
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/*
@@ -38,10 +37,10 @@ RUN apt-get update && apt-get install -y \
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
  # 分开安装一些可能相互依赖或安装耗时的包,增加稳定性
 
29
  python3-pip \
30
  python3-dev \
31
  build-essential \
 
32
  python3-venv \
33
  python3-wheel \
34
  && rm -rf /var/lib/apt/lists/*
 
37
  # 注意:Prophet R 包在内部调用了 Python 的 Prophet 库
38
  # 我们将 pystan 和 fbprophet 分开安装,并尝试指定一个稳定版本
39
  # 例如,fbprophet 0.7.1 是一个广泛使用的稳定版本,它通常与 pystan < 2.0 兼容
40
+ # 尝试使用 --break-system-packages 解决 pip 自身升级的问题
41
+ RUN pip3 install --upgrade pip --break-system-packages
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
 
45
  # 安装所有必需的 R 包
46
  # 分开安装一些可能相互依赖或安装耗时的包,增加稳定性