zxsipola123456 commited on
Commit
43f5fdb
1 Parent(s): bbe54bc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -15
Dockerfile CHANGED
@@ -1,19 +1,12 @@
1
- # 使用合适的基础镜像
2
  FROM ubuntu:20.04
3
- RUN apt-get update && apt-get install -y tzdata
4
- ENV TZ=Asia/Shanghai
5
- RUN dpkg-reconfigure -f noninteractive tzdata
6
- # 更新并安装所需的依赖
7
  RUN apt-get update && apt-get install -y \
8
- mysql-server \
9
- nginx \
10
- nodejs \
11
- npm \
12
  python3-pip \
 
13
  curl \
14
  wget \
15
- supervisor \
16
- curl \
17
  gnupg2 \
18
  lsb-release \
19
  openssl \
@@ -23,15 +16,22 @@ RUN apt-get update && apt-get install -y \
23
  apt-transport-https \
24
  ca-certificates \
25
  software-properties-common \
26
- docker.io \
27
- git \
28
  && apt-get clean
29
 
 
 
 
30
 
31
  # 设置工作目录
32
  WORKDIR /ragflow
33
 
34
- # 复制各个服务的文件
 
 
 
 
 
 
35
  COPY ./web ./web
36
  COPY ./api ./api
37
  COPY ./conf ./conf
@@ -47,7 +47,6 @@ RUN cd ./web && npm install --force && npm run build
47
  ENV PYTHONPATH=/ragflow/
48
  ENV HF_ENDPOINT=https://hf-mirror.com
49
 
50
-
51
  # 复制Supervisord配置文件
52
  COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
53
 
@@ -57,3 +56,4 @@ RUN chmod +x /usr/local/bin/entrypoint.sh
57
 
58
  # 设置启动时执行的命令
59
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
 
 
 
1
  FROM ubuntu:20.04
2
+
3
+ # 更新并安装基础依赖
 
 
4
  RUN apt-get update && apt-get install -y \
5
+ tzdata \
 
 
 
6
  python3-pip \
7
+ python3-dev \
8
  curl \
9
  wget \
 
 
10
  gnupg2 \
11
  lsb-release \
12
  openssl \
 
16
  apt-transport-https \
17
  ca-certificates \
18
  software-properties-common \
 
 
19
  && apt-get clean
20
 
21
+ # 设置时区
22
+ ENV TZ=Asia/Shanghai
23
+ RUN dpkg-reconfigure -f noninteractive tzdata
24
 
25
  # 设置工作目录
26
  WORKDIR /ragflow
27
 
28
+ # 复制 requirements.txt 文件
29
+ COPY ./requirements.txt /ragflow/requirements.txt
30
+
31
+ # 安装 Python 依赖
32
+ RUN pip3 install --no-cache-dir -r /ragflow/requirements.txt
33
+
34
+ # 复制其他项目文件
35
  COPY ./web ./web
36
  COPY ./api ./api
37
  COPY ./conf ./conf
 
47
  ENV PYTHONPATH=/ragflow/
48
  ENV HF_ENDPOINT=https://hf-mirror.com
49
 
 
50
  # 复制Supervisord配置文件
51
  COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
52
 
 
56
 
57
  # 设置启动时执行的命令
58
  ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
59
+