clash-linux commited on
Commit
40a164c
·
verified ·
1 Parent(s): e902fb4

Upload 11 files

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -3
Dockerfile CHANGED
@@ -57,11 +57,19 @@ COPY requirements.txt ./
57
  # 升级 pip
58
  RUN pip install --upgrade pip
59
 
60
- # 安装Cython 和 PyYAML 构建时可能需要的 setuptools
61
  RUN pip install --no-cache-dir Cython setuptools
62
 
63
- # 安装Python依赖
64
- RUN echo "Installing Python dependencies..." && \
 
 
 
 
 
 
 
 
65
  pip install --no-cache-dir -r requirements.txt
66
 
67
  # 可选:删除构建依赖以减小镜像体积
 
57
  # 升级 pip
58
  RUN pip install --upgrade pip
59
 
60
+ # 安装Cython 和 setuptools (作为PyYAML构建依赖的后备)
61
  RUN pip install --no-cache-dir Cython setuptools
62
 
63
+ # 设置环境变量,帮助PyYAML找到系统libyaml
64
+ ENV YAML_INCLUDE_DIR=/usr/include \
65
+ YAML_LIB_DIR=/usr/lib
66
+
67
+ # 单独安装PyYAML,尝试强制使用系统库
68
+ RUN echo "Installing PyYAML..." && \
69
+ pip install --no-cache-dir --no-build-isolation PyYAML==6.0
70
+
71
+ # 安装剩余的Python依赖
72
+ RUN echo "Installing remaining Python dependencies..." && \
73
  pip install --no-cache-dir -r requirements.txt
74
 
75
  # 可选:删除构建依赖以减小镜像体积