From babaac93af28d5ff095fef6880e74e4e67ce5cad Mon Sep 17 00:00:00 2001 From: lasse <77295879+lassejlv@users.noreply.github.com> Date: Thu, 28 Aug 2025 20:01:52 +0200 Subject: [PATCH 1/2] Update Dockerfile --- Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0182438..c1b268d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,16 @@ 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 +# Create the directory and download the model +RUN mkdir -p /home/.u2net && \ + curl -L https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx \ + -o /home/.u2net/u2net.onnx WORKDIR /app COPY requirements.txt . - RUN pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 5100 - -CMD ["python", "app.py"] \ No newline at end of file +CMD ["python", "app.py"] From 4dba413390b01a90207afa259ba3f2ba2edbb93b Mon Sep 17 00:00:00 2001 From: lasse <77295879+lassejlv@users.noreply.github.com> Date: Thu, 28 Aug 2025 20:05:33 +0200 Subject: [PATCH 2/2] Update requirements.txt --- requirements.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 10ac15b..fb11ed8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ flask rembg -pillow \ No newline at end of file +pillow +onnxruntime