From ac2dcd91521e8e09e1adbcef7e1235100eb40165 Mon Sep 17 00:00:00 2001 From: Chris Freas Date: Fri, 22 Mar 2024 10:31:28 -0400 Subject: [PATCH] Copy training weights from remote URL during image build. --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0182438..1f9f56f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ FROM python:3.9 # download this https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx -# copy model to avoid unnecessary download -COPY u2net.onnx /home/.u2net/u2net.onnx +ADD https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx /root/.u2net/u2net.onnx WORKDIR /app @@ -14,4 +13,4 @@ COPY . . EXPOSE 5100 -CMD ["python", "app.py"] \ No newline at end of file +CMD ["python", "app.py"]