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"] 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