mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-08-16 19:35:55 +08:00
add dockerfile
This commit is contained in:
parent
332c16b58e
commit
e40b1e3e6b
7
Dockerfile
Normal file
7
Dockerfile
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
FROM nvidia/cuda
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y --no-install-recommends python3 python3-pip python3-dev llvm llvm-dev
|
||||||
|
RUN pip3 install rembg
|
||||||
|
|
||||||
|
ENTRYPOINT ["rembg"]
|
||||||
|
CMD []
|
@ -99,6 +99,14 @@ Then run
|
|||||||
cat input.png | python app.py > out.png
|
cat input.png | python app.py > out.png
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Usage as a docker
|
||||||
|
|
||||||
|
Just run
|
||||||
|
|
||||||
|
```
|
||||||
|
curl -s http://input.png | docker run -i -v ~/.u2net:/root/.u2net danielgatis/rembg:latest > output.png
|
||||||
|
```
|
||||||
|
|
||||||
### Advance usage
|
### Advance usage
|
||||||
|
|
||||||
Sometimes it is possible to achieve better results by turning on alpha matting. Example:
|
Sometimes it is possible to achieve better results by turning on alpha matting. Example:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user