File size: 970 Bytes
c8210cf
 
 
 
 
 
 
 
 
 
 
 
 
a11935b
 
c8210cf
 
 
596ec6f
c8210cf
 
4273297
c8210cf
 
40ce635
a11935b
 
2cfdc83
a49a67a
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
FROM continuumio/miniconda3

ARG OPENAI_API_KEY
ENV OPENAI_API_KEY=${OPENAI_API_KEY}

ARG BING_API_KEY
ENV BING_API_KEY=${BING_API_KEY}

ENV PATH=/opt/conda/bin:$PATH

RUN git clone https://github.com/InternLM/MindSearch.git /app

WORKDIR /app
# 复制应用程序代码和依赖文件
COPY frontend/mindsearch_streamlit.py ./frontend/mindsearch_streamlit.py
# 创建并激活 fastapi 环境,并安装依赖包
RUN conda create --name fastapi python=3.10 -y && \
    conda run -n fastapi pip install -r requirements.txt && \
    conda run -n fastapi pip install streamlit && \
    conda clean --all -f -y
# 暴露 FastAPI 默认端口
EXPOSE 8002

# 启动 FastAPI 服务
CMD ["conda", "run", "-n", "fastapi", "uvicorn", "mindsearch.app:app", "--host", "localhost", "--port", "8002"]
# 暴露 Streamlit 默认端口
EXPOSE 8501
# Run streamlit app when the container launches
CMD ["conda", "run", "-n", "fastapi","streamlit", "run", "frontend/mindsearch_streamlit.py"]