Browse Source

feat: 添加docker打包脚本

tuon 1 year ago
parent
commit
fc19037f54
2 changed files with 16 additions and 0 deletions
  1. 13 0
      Dockerfile
  2. 3 0
      build.sh

+ 13 - 0
Dockerfile

@@ -0,0 +1,13 @@
+FROM python:3.10.4
+
+RUN mkdir /app
+
+COPY . /app
+
+RUN python -m pip install paddlepaddle==2.5.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
+
+RUN cd /app && pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
+
+WORKDIR /app
+ENTRYPOINT ["python"]
+CMD ["main.py", "--production"]

+ 3 - 0
build.sh

@@ -0,0 +1,3 @@
+# /bin/sh
+# 打包镜像
+docker build -t registry.cn-hangzhou.aliyuncs.com/tuon-pub/matting-human .