leezhuuu commited on
Commit
0e77b91
1 Parent(s): 2e37ccd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -1
Dockerfile CHANGED
@@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y \
21
  FROM python:3.10-slim
22
 
23
  # 设置工作目录
24
- WORKDIR /app
25
 
26
  # 从构建阶段复制必要的文件
27
  COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
@@ -30,6 +30,10 @@ COPY . .
30
 
31
  # 设置环境变量
32
  ENV PYTHONUNBUFFERED=1
 
 
 
 
33
 
34
  # 暴露 Flask 端口
35
  EXPOSE 5000
 
21
  FROM python:3.10-slim
22
 
23
  # 设置工作目录
24
+ WORKDIR /tmp
25
 
26
  # 从构建阶段复制必要的文件
27
  COPY --from=builder /usr/local/lib/python3.10/site-packages /usr/local/lib/python3.10/site-packages
 
30
 
31
  # 设置环境变量
32
  ENV PYTHONUNBUFFERED=1
33
+ ENV MPLCONFIGDIR=/tmp/matplotlib
34
+
35
+ # 确保Matplotlib配置目录可写
36
+ RUN mkdir -p /tmp/matplotlib && chmod -R 777 /tmp/matplotlib
37
 
38
  # 暴露 Flask 端口
39
  EXPOSE 5000