Create Dockerfile
Browse files- Dockerfile +35 -0
Dockerfile
ADDED
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a base image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Clone the Langchain-Chatchat repository
|
8 |
+
RUN git clone https://github.com/chatchat-space/Langchain-Chatchat.git
|
9 |
+
|
10 |
+
# Change to the Langchain-Chatchat directory
|
11 |
+
WORKDIR /app/Langchain-Chatchat
|
12 |
+
|
13 |
+
# Install project dependencies
|
14 |
+
RUN pip install -r requirements.txt
|
15 |
+
RUN pip install -r requirements_api.txt
|
16 |
+
RUN pip install -r requirements_webui.txt
|
17 |
+
|
18 |
+
# Uncomment the following line if you want to use additional vector libraries like milvus/pg_vector
|
19 |
+
RUN pip install -r requirements_extra.txt
|
20 |
+
|
21 |
+
# Clone required models using Git LFS
|
22 |
+
RUN apt-get update && apt-get install -y git-lfs
|
23 |
+
RUN git lfs install
|
24 |
+
RUN git clone https://huggingface.co/THUDM/chatglm2-6b
|
25 |
+
RUN git clone https://huggingface.co/moka-ai/m3e-base
|
26 |
+
|
27 |
+
# Initialize knowledge base and config file
|
28 |
+
RUN python copy_config_example.py
|
29 |
+
RUN python init_database.py --recreate-vs
|
30 |
+
|
31 |
+
# Expose the required port
|
32 |
+
EXPOSE 80
|
33 |
+
|
34 |
+
# Run the project on container startup
|
35 |
+
CMD ["python", "startup.py", "-a"]
|