Browse Source

修改docker部署

xueyiming 3 days ago
parent
commit
b3e66b5469
1 changed files with 5 additions and 0 deletions
  1. 5 0
      Dockerfile

+ 5 - 0
Dockerfile

@@ -6,6 +6,11 @@ WORKDIR /app
 ENV PYTHONDONTWRITEBYTECODE=1 \
 ENV PYTHONDONTWRITEBYTECODE=1 \
     PYTHONUNBUFFERED=1
     PYTHONUNBUFFERED=1
 
 
+# 安装编译工具链(某些依赖如 pyfim 构建 wheel 需要 gcc)
+RUN apt-get update \
+    && apt-get install -y --no-install-recommends gcc g++ build-essential \
+    && rm -rf /var/lib/apt/lists/*
+
 # 1) 安装依赖(利用 Docker layer 缓存)
 # 1) 安装依赖(利用 Docker layer 缓存)
 COPY requirements.txt /app/requirements.txt
 COPY requirements.txt /app/requirements.txt
 RUN pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/
 RUN pip install --no-cache-dir --upgrade pip -i https://pypi.tuna.tsinghua.edu.cn/simple/