17 lines
397 B
Docker
17 lines
397 B
Docker
FROM python:3.12.2-slim
|
|
|
|
# download this https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx
|
|
# copy model to avoid unnecessary download
|
|
ADD https://github.com/danielgatis/rembg/releases/download/v0.0.0/u2net.onnx /root/.u2net/u2net.onnx
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
EXPOSE 5100
|
|
|
|
CMD ["python", "app.py"] |