replicate / dreambooth-template

A template repo for training and publishing your own custom Stable Diffusion model using https://replicate.com/replicate/dreambooth
Apache License 2.0
51 stars 10 forks source link

Is it possible to `cog push` this model without a GPU? #2

Closed zeke closed 1 year ago

zeke commented 1 year ago

Is a GPU required to build and push this model?

I tried to cog push my copy of this repo from my M1 mac and it failed.

cc @chenxwh

`cog push` output ``` ``` ~/git/replicate/cog-dreambooth main* ⇡ python-3.10.4 ∴ cog push ⚠ Cog doesn't know if CUDA 11.6.2 is compatible with PyTorch 1.12.1 --extra-index-url=https://download.pytorch.org/whl/cu116. This might cause CUDA problems. Building Docker image from environment in cog.yaml as r8.im/zeke/zekebooth... [+] Building 533.0s (5/16) ... => [internal] load build context 1327.1s => => transferring context: 4.29GB 1326.9s => [stage-0 2/10] RUN rm -f /etc/apt/sources.list.d/cuda.list && rm -f /etc/apt/sources.list.d/nvidia-ml.list && apt-key del 7fa2af80 6.7s => [stage-0 3/10] RUN --mount=type=cache,target=/var/cache/apt apt-get update -qq && apt-get install -qqy --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev 92.1s => ERROR [stage-0 4/10] RUN curl -s -S -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && pyenv install-latest "3.10" && pyenv global $(pyenv ins 30.0s ------ > [stage-0 4/10] RUN curl -s -S -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && pyenv install-latest "3.10" && pyenv global $(pyenv install-latest --print "3.10") && pip install "wheel<1": #0 1.065 Cloning into '/root/.pyenv'... #0 2.684 Cloning into '/root/.pyenv/plugins/pyenv-doctor'... #0 3.881 Cloning into '/root/.pyenv/plugins/pyenv-installer'... #0 5.040 Cloning into '/root/.pyenv/plugins/pyenv-update'... #0 6.242 Cloning into '/root/.pyenv/plugins/pyenv-virtualenv'... #0 7.530 Cloning into '/root/.pyenv/plugins/pyenv-which-ext'... #0 9.134 Cloning into '/root/.pyenv/plugins/pyenv-install-latest'... #0 11.29 Install 3.10.8... #0 14.26 Downloading Python-3.10.8.tar.xz... #0 14.26 -> https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tar.xz #0 22.98 Installing Python-3.10.8... #0 29.31 #0 29.31 BUILD FAILED (Ubuntu 20.04 using python-build 20180424) #0 29.42 #0 29.44 Inspect or clean up the working tree at /tmp/python-build.20221109213644.545 #0 29.47 Results logged to /tmp/python-build.20221109213644.545.log #0 29.47 #0 29.47 Last 10 log lines: #0 29.49 checking for --with-universal-archs... no #0 29.49 checking MACHDEP... "linux" #0 29.49 checking for gcc... gcc #0 29.49 checking whether the C compiler works... yes #0 29.49 checking for C compiler default output file name... a.out #0 29.49 checking for suffix of executables... #0 29.49 checking whether we are cross compiling... configure: error: in `/tmp/python-build.20221109213644.545/Python-3.10.8': #0 29.49 configure: error: cannot run C compiled programs. #0 29.49 If you meant to cross compile, use `--host'. #0 29.49 See `config.log' for more details ------ ERROR: failed to solve: executor failed running [/bin/sh -c curl -s -S -L https://raw.githubusercontent.com/pyenv/pyenv-installer/master/bin/pyenv-installer | bash && git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest && pyenv install-latest "3.10" && pyenv global $(pyenv install-latest --print "3.10") && pip install "wheel<1"]: exit code: 1 ⅹ Failed to build Docker image: exit status 1 ``` ```
chenxwh commented 1 year ago

gpu is required in cog.yaml and for inference, so probably yes.

zeke commented 1 year ago

Gotcha. Added that to prereqs here: https://github.com/replicate/cog-dreambooth/commit/fe5f758168e4934fd41c93707154b70592e3c751

zeke commented 1 year ago

Reopening.. according to @bfirsh we should be able to cog push without a GPU.

If so, we should make that clear in the README.