-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker update to 0.3.1.1 fix: duplicated logs in chatchat.log fix: nltk data path was not set correctlly fix: 重建知识库时只处理了一个知识库 --------- Co-authored-by: imClumsyPanda <[email protected]> Co-authored-by: yuehua <[email protected]> Co-authored-by: yuehuazhang <[email protected]>
- Loading branch information
1 parent
ea09c4c
commit cbfdd72
Showing
11 changed files
with
94 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,53 @@ | ||
# Base Image | ||
# 基础镜像 | ||
FROM python:3.11 | ||
# Labels | ||
LABEL maintainer=chatchat | ||
# Environment Variables | ||
ENV HOME=/usr/local/lib/python3.11/site-packages/chatchat | ||
# Init Environment | ||
LABEL maintainer=Langchain-Chatchat | ||
WORKDIR /root | ||
# 环境变量 | ||
ENV CHATCHAT_ROOT=/root/chatchat_data | ||
ENV RELEASE=0.3.1.1 | ||
|
||
# 初始化环境 | ||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ | ||
echo "Asia/Shanghai" > /etc/timezone | ||
# Install Dependencies | ||
RUN apt-get update -y && \ | ||
apt-get install -y git && \ | ||
apt-get install -y --no-install-recommends libgl1 libglib2.0-0 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
RUN pip install openpyxl networkx faiss-cpu jq unstructured[pdf] \ | ||
opencv-python rapidocr-onnxruntime PyMuPDF rank_bm25 youtube_search python-docx | ||
# Install Chatchat | ||
RUN pip install --index-url https://pypi.python.org/simple/ langchain-chatchat -U | ||
RUN pip install --upgrade pip setuptools | ||
RUN #pip install --index-url https://pypi.python.org/simple/ pipx && pipx install poetry --force | ||
# Add poetry to PATH | ||
#ENV PATH="/root/.local/bin:${PATH}" | ||
|
||
# 下载 Langchain-Chatchat | ||
RUN #git clone https://github.com/chatchat-space/Langchain-Chatchat.git | ||
RUN pip install --index-url https://pypi.python.org/simple/ "langchain-chatchat[xinference]"==$RELEASE -U | ||
|
||
#WORKDIR /root/Langchain-Chatchat/libs/chatchat-server | ||
|
||
# 设置 poetry 官方源 | ||
#RUN poetry config virtualenvs.create false && \ | ||
# poetry config repositories.pypi.url https://pypi.org/simple/ | ||
|
||
# 安装依赖 | ||
RUN #poetry install --with lint,test -E xinference | ||
|
||
# 初始化配置 | ||
RUN #python cli.py init | ||
RUN chatchat init | ||
|
||
# Install ModelProvider | ||
RUN pip install xinference-client | ||
# Make Custom Settings | ||
RUN chatchat-config server --default_bind_host=0.0.0.0 && \ | ||
chatchat-config model --default_llm_model qwen2-instruct | ||
# Copy Data | ||
ADD /docker/data.tar.gz $HOME/ | ||
WORKDIR $HOME | ||
#RUN pip install xinference-client | ||
|
||
# 将监听 IP 从 localhost 统一改为 0.0.0.0 | ||
RUN sed -i 's/127.0.0.1/0.0.0.0/g' $CHATCHAT_ROOT/basic_settings.yaml | ||
|
||
# 初始化知识库文件 | ||
ADD /docker/data.tar.gz $CHATCHAT_ROOT/ | ||
|
||
WORKDIR $CHATCHAT_ROOT | ||
|
||
EXPOSE 7861 8501 | ||
ENTRYPOINT ["chatchat", "-a"] | ||
|
||
#ENTRYPOINT ["python", "cli.py", "start", "-a"] | ||
ENTRYPOINT ["chatchat", "start", "-a"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters