Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why docker image size is very big #51

Closed
ooing opened this issue Dec 19, 2020 · 5 comments
Closed

why docker image size is very big #51

ooing opened this issue Dec 19, 2020 · 5 comments

Comments

@ooing
Copy link

ooing commented Dec 19, 2020

~ docker pull danielgatis/rembg
Using default tag: latest
latest: Pulling from danielgatis/rembg
6a5697faee43: Pull complete 
ba13d3bc422b: Pull complete 
a254829d9e55: Pull complete 
f853e5702a31: Pull complete 
29cfce72a460: Pull complete 
4bb689f629d3: Pull complete 
302d6ee79e94: Downloading [=========>                                         ]    273MB/1.501GB
fe1233ff1aac: Downloading [=========>                                         ]  233.1MB/1.236GB
e8e3fb0eda20: Download complete 
5bbf6ed80873: Downloading [>                                                  ]   29.4MB/1.816GB
@danielgatis
Copy link
Owner

danielgatis commented Dec 19, 2020

because of cuda's dependencies

FROM nvidia/cuda            <---------------- here!

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

@ooing ooing closed this as completed Dec 20, 2020
@ooing ooing reopened this Dec 20, 2020
@lekoOwO
Copy link
Contributor

lekoOwO commented Dec 28, 2020

I've installed it into a container with no cuda deps. (My server has no GPU installed)

Do you need any help with it?

@ooing
Copy link
Author

ooing commented Dec 29, 2020

@lekoOwO can you show your Dockerfile

@a-stankevich
Copy link

a-stankevich commented Dec 31, 2020

I noticed that too, using image from danielgatis/rembg:latest.

At the same time ibebbs/u2net-http image is 1.82GB total.

@lekoOwO
Copy link
Contributor

lekoOwO commented Jan 5, 2021

@lekoOwO can you show your Dockerfile

I run on a LXC Container, so I have no Dockerfile to share.
Here's the things I've installed on my Ubuntu container with no GPU:

apt install python3.8 python3.8-dev python3.8-pip python3.8-distutils llvm-10 
python3.8 -m pip install torch==1.7.0 torchvision==0.8.1 -f https://download.pytorch.org/whl/cpu/torch_stable.html
python3.8 -m pip install rembg

I think this might somewhat work. Not tested.

FROM ubuntu:latest
RUN apt-get update && apt-get install -y --no-install-recommends python3.8-dev python3.8-pip python3.8-distutils llvm-10 && pip3 install torch==1.7.0 torchvision==0.8.1 -f https://download.pytorch.org/whl/cpu/torch_stable.html
RUN pip3 install rembg

ENTRYPOINT ["rembg"]
CMD []

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants