replicate / cog

Containers for machine learning
https://cog.run
Apache License 2.0
8.02k stars 560 forks source link

build error #451

Closed Hurricane-eye closed 2 years ago

Hurricane-eye commented 2 years ago

when I build a model with cog, I always get this error and fail to build. How can I handle this?

 => ERROR [stage-0  3/12] RUN curl https://pyenv.run | bash &&  git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugin  125.3s
------
 > [stage-0  3/12] RUN curl https://pyenv.run | bash &&         git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest &&        pyenv install-latest "3.8.2" &&         pyenv global $(pyenv install-latest --print "3.8.2"):
#8 1.093   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#8 1.093                                  Dload  Upload   Total   Spent    Left  Speed
100   270  100   270    0     0    102      0  0:00:02  0:00:02 --:--:--   102
#8 3.785 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
#8 3.788 /bin/sh: 1: pyenv: not found
#8 3.811 Cloning into '/plugins/pyenv-install-latest'...
#8 124.1 fatal: unable to access 'https://github.com/momo-lab/pyenv-install-latest.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.
------
executor failed running [/bin/sh -c curl https://pyenv.run | bash &&    git clone https://github.com/momo-lab/pyenv-install-latest.git "$(pyenv root)"/plugins/pyenv-install-latest &&        pyenv install-latest "3.8.2" &&         pyenv global $(pyenv install-latest --print "3.8.2")]: exit code: 128
ⅹ Failed to build Docker image: exit status 1
bfirsh commented 2 years ago

Hello @Hurricane-eye! It looks like Docker can't access GitHub for some reason. Are you behind some kind of proxy, or a corporate/school network? Are you using Docker for anything else -- does it work for those things?

Hurricane-eye commented 2 years ago

@bfirsh Thanks for you quick reply! I don't think I use any kind of proxy, but I actually use a shcool network. I never try to downloaded something from Github when I built a docker image before. Maybe use proxy in docker can solve this? But it seems can't be done with cog build command.

bfirsh commented 2 years ago

That would probably explain it. It's probably not possible to build Docker images in your school network.

What model are you trying to build? Is it your own, or somebody else's?

Hurricane-eye commented 2 years ago

@bfirsh I am trying to build some useful and easy to test models like wav2lip and GPEN. I used to build GPEN docker image successfully with my own dockfile but the source code was downloaded in local and used 'ADD' command to add in the image.

Hurricane-eye commented 2 years ago

Using the method mentioned in https://docs.docker.com/network/proxy/ can handle this problem.

zeke commented 2 years ago

Thanks for following up and sharing how you worked around this, @Hurricane-eye. ✨

zeke commented 2 years ago

@all-contributors please add @Hurricane-eye for bugs and questions

allcontributors[bot] commented 2 years ago

@zeke

I've put up a pull request to add @Hurricane-eye! :tada: