余尚辉 3 months ago
parent
commit
08930610a1
1 changed files with 9 additions and 2 deletions
  1. 9 2
      Dockerfile

+ 9 - 2
Dockerfile

@@ -3,11 +3,18 @@ RUN apt-get update && \
     apt-get install -y vim wget curl sngrep tcpflow tcpdump
 
 
+# 设置工作目录
 WORKDIR /code
-ADD . .
 
+# 复制 requirements.txt 到镜像中
+COPY ./requirements.txt /code/requirements.txt
 
-RUN pip install -r requirements.txt
+# 复制 model 和 m3e 到镜像内对应路径
+COPY ./models /home/model-server/
+COPY ./m3e /home/model-server/m3e/
+
+# 安装依赖
+RUN pip install -r /code/requirements.txt
 
 EXPOSE 50072
 #CMD ["gunicorn", "-w 1", "-b 0.0.0.0:8000", "src.core.server:app"]