File size: 839 Bytes
77ecd1e
c31f3f8
3233b7d
 
 
 
 
 
7a3d650
d805d35
 
 
 
7a3d650
 
d805d35
 
7a3d650
 
c31f3f8
d805d35
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM ghcr.io/open-webui/open-webui:main

# 安装Python依赖
RUN apt-get update && apt-get install -y python3 python3-pip --no-install-recommends && \
    pip3 install --no-cache-dir huggingface_hub && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# 复制自定义文件
COPY custom.css /app/build/assets/
COPY custom.js /app/build/assets/
COPY editor.css /app/build/assets/
COPY editor.js /app/build/assets/

# 修改HTML引用
RUN sed -i 's|</head>|<link rel="stylesheet" href="assets/editor.css"></link><link rel="stylesheet" href="assets/custom.css"></link></head>|' /app/build/index.html && \
    sed -i 's|</body>|<script src="assets/editor.js"></script><script src="assets/custom.js"></script></body>|' /app/build/index.html

# 设置权限
RUN chmod -R 777 ./data && \
    chmod -R 777 /app/backend/open_webui/static