Spaces:
Paused
Paused
File size: 1,832 Bytes
671aaae 43f5fdb 3cce215 43f5fdb 671aaae 43f5fdb 671aaae 43f5fdb 671aaae 820b544 d13ec66 820b544 47f5fde 43f5fdb bbe54bc c44aa51 671aaae 43f5fdb 671aaae 43f5fdb |
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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
FROM ubuntu:20.04
# 设置时区
RUN apt-get update && apt-get install -y tzdata
ENV TZ=Asia/Shanghai
RUN dpkg-reconfigure -f noninteractive tzdata
# 更新并安装基础依赖
RUN apt-get update && apt-get install -y \
tzdata \
python3-pip \
python3-dev \
curl \
wget \
gnupg2 \
lsb-release \
openssl \
iputils-ping \
net-tools \
unzip \
apt-transport-https \
ca-certificates \
software-properties-common \
&& apt-get clean
RUN pip install tokenizers==0.18.0
RUN pip install huggingface-hub==0.21.2
RUN pip install urllib3==2.0.0
RUN pip install fsspec==2024.5.0
RUN pip install certifi==2021.10.8
RUN pip install pycryptodome==3.9.9
RUN pip install pytz==2020.5
RUN pip install python-dateutil==2.9.0.post0
# 设置时区
ENV TZ=Asia/Shanghai
RUN dpkg-reconfigure -f noninteractive tzdata
# 安装 Node.js 和 npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs
# 设置工作目录
WORKDIR /ragflow
# 复制 requirements.txt 文件
COPY ./requirements.txt /ragflow/requirements.txt
# 安装 Python 依赖
RUN pip3 install --no-cache-dir -r /ragflow/requirements.txt
# 复制其他项目文件
COPY ./web ./web
COPY ./api ./api
COPY ./conf ./conf
COPY ./deepdoc ./deepdoc
COPY ./rag ./rag
COPY ./agent ./agent
COPY ./graphrag ./graphrag
# 安装Web应用的依赖并构建
RUN cd ./web && npm install --force && npm run build
# 设置环境变量
ENV PYTHONPATH=/ragflow/
ENV HF_ENDPOINT=https://hf-mirror.com
# 复制Supervisord配置文件
COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# 复制启动脚本
COPY ./docker/entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
# 设置启动时执行的命令
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|