solitudeLin commited on
Commit
4273297
1 Parent(s): b09f210

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -3
Dockerfile CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  FROM continuumio/miniconda3
2
 
3
  ARG OPENAI_API_KEY
@@ -15,17 +18,16 @@ RUN git clone https://github.com/InternLM/MindSearch.git /app
15
  WORKDIR /app
16
  # 复制应用程序代码和依赖文件
17
  COPY frontend/mindsearch_streamlit.py ./frontend/mindsearch_streamlit.py
18
- COPY requirements.txt ./
19
  # 创建并激活 fastapi 环境,并安装依赖包
20
  RUN conda create --name fastapi python=3.10 -y && \
21
  conda run -n fastapi pip install -r requirements.txt && \
22
  conda run -n fastapi pip install streamlit && \
23
  conda clean --all -f -y
24
  # 暴露 FastAPI 默认端口
25
- EXPOSE 8000
26
 
27
  # 启动 FastAPI 服务
28
- CMD ["conda", "run", "-n", "fastapi", "uvicorn", "mindsearch.app:app", "--host", "0.0.0.0", "--port", "8000"]
29
  # 暴露 Streamlit 默认端口
30
  EXPOSE 8501
31
  # Run streamlit app when the container launches
 
1
+ RUN useradd -m -u 1000 user
2
+ USER user
3
+
4
  FROM continuumio/miniconda3
5
 
6
  ARG OPENAI_API_KEY
 
18
  WORKDIR /app
19
  # 复制应用程序代码和依赖文件
20
  COPY frontend/mindsearch_streamlit.py ./frontend/mindsearch_streamlit.py
 
21
  # 创建并激活 fastapi 环境,并安装依赖包
22
  RUN conda create --name fastapi python=3.10 -y && \
23
  conda run -n fastapi pip install -r requirements.txt && \
24
  conda run -n fastapi pip install streamlit && \
25
  conda clean --all -f -y
26
  # 暴露 FastAPI 默认端口
27
+ EXPOSE 8002
28
 
29
  # 启动 FastAPI 服务
30
+ CMD ["conda", "run", "-n", "fastapi", "uvicorn", "mindsearch.app:app", "--host", "0.0.0.0", "--port", "8002"]
31
  # 暴露 Streamlit 默认端口
32
  EXPOSE 8501
33
  # Run streamlit app when the container launches