Skip to content

Commit

Permalink
Limit max threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Lajcisvk committed Oct 6, 2023
1 parent dc60b4c commit 11d0dd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM python:3.10-slim

WORKDIR /var/www/
WORKDIR /rembg

RUN python -m pip install "rembg[cli]"
COPY . .

RUN python -m pip install ".[cli]"
RUN python -c 'from rembg.bg import download_models; download_models()'

EXPOSE 5000
ENTRYPOINT ["rembg"]
CMD ["s"]
CMD ["s", "-t 8"]
6 changes: 3 additions & 3 deletions docker-compose.development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
context: .
tty: true
stdin_open: true
volumes:
- "./:/var/www"
ports:
- "5100:5000"
- "6200:5000"
environment:
OMP_NUM_THREADS: 4

0 comments on commit 11d0dd2

Please sign in to comment.