File size: 951 Bytes
7a192f3
0df9c23
ac07394
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cbee77b
 
7a192f3
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM ghcr.io/open-webui/open-webui:main

# 安装Redis
RUN apt-get update && apt-get install -y redis-server

# 修改Redis配置和权限
RUN mkdir -p /var/run/redis && \
   chown -R 1000:1000 /var/run/redis && \
   chown -R 1000:1000 /var/lib/redis && \
   chmod 777 /var/run/redis

# 创建启动Redis的脚本
RUN echo "#!/bin/bash" > redis-start.sh && \
   echo "redis-server --daemonize yes --save '' --appendonly no" >> redis-start.sh && \
   echo "sleep 2" >> redis-start.sh && \
   echo "echo 'Redis status:'" >> redis-start.sh && \
   echo "redis-cli ping" >> redis-start.sh

RUN chmod -R 777 ./data && \
   sed -i "1r redis-start.sh" ./start.sh

RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip3 install --no-cache-dir huggingface_hub

COPY sync_data.sh sync_data.sh

RUN chmod -R 777 ./data && \
    chmod -R 777 /app/backend/open_webui/static && \
    chmod +x sync_data.sh && \
    sed -i "1r sync_data.sh" ./start.sh