mirror of
https://git.mirrors.martin98.com/https://github.com/danielgatis/rembg
synced 2025-04-18 11:49:48 +08:00
Merge pull request #746 from catscarlet/main
Follow the changes of model downloading #742
This commit is contained in:
commit
9c574fd094
@ -7,7 +7,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends python3-pip pyt
|
||||
COPY . .
|
||||
|
||||
RUN python -m pip install ".[gpu,cli]" --break-system-packages
|
||||
RUN rembg d
|
||||
RUN rembg d u2net
|
||||
|
||||
EXPOSE 7000
|
||||
ENTRYPOINT ["rembg"]
|
||||
|
@ -367,7 +367,8 @@ After you build the image, run it like this as a cli
|
||||
sudo docker run --rm -it --gpus all -v /dev/dri:/dev/dri -v $PWD:/rembg rembg-nvidia-cuda-cudnn-gpu i -m birefnet-general input.png output.png
|
||||
```
|
||||
|
||||
Trick: Actually you can also make up a nvidia-cuda-cudnn-gpu image and install rembg[gpu, cli] in it.
|
||||
- Trick 1: Actually you can also make up a nvidia-cuda-cudnn-gpu image and install rembg[gpu, cli] in it.
|
||||
- Trick 2: Try param `-v /somewhereYouStoresModelFiles/:/root/.u2net` so to download/store model files out of docker images. You can even comment the line `RUN rembg d u2net` so when builing the image, it download will no models, so you can download the specific model you want even without the default u2net model.
|
||||
|
||||
## Models
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user