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

cannot run docker-compose up --build #5549

Closed
Fatima-yo opened this issue Nov 26, 2019 · 34 comments · Fixed by #5554
Closed

cannot run docker-compose up --build #5549

Fatima-yo opened this issue Nov 26, 2019 · 34 comments · Fixed by #5554
Labels

Comments

@Fatima-yo
Copy link

Fatima-yo commented Nov 26, 2019

Describe the bug
While trying to get the local docker repo up and running, I get to the step when I must run " docker-compose up --build" and I get and error.

To Reproduce

  1. follow the instructions here:
    https://docs.gitcoin.co/mk_setup/
  2. until you run the following:
    docker-compose up --build

Expected behavior
The docker container should start up.

Screenshots
I get the following error displayed on the console:
ERROR: unsatisfiable constraints:
so:libheif.so.1 (missing):
required by: vips-8.8.3-r2[so:libheif.so.1]
vips-8.8.3-r2[so:libheif.so.1]
vips-8.8.3-r2[so:libheif.so.1]
ERROR: Service 'web' failed to build: The command '/bin/sh -c apk add --no-cache --update $PACKAGES && apk add --no-cache --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ vips && apk add --no-cache --update --virtual .builder $BUILD_DEPS' returned a non-zero code: 2

Desktop (please complete the following information):

  • OS: Ubuntu Studio 19
  • Docker Version: docker-compose version 1.21.0
  • Gitcoin Version: 1.0.0
@mul1sh
Copy link
Contributor

mul1sh commented Nov 26, 2019

Same here running into the same issue

Seems to be an issue with the vips package i.e.

# Install general dependencies.
RUN apk add --no-cache --update $PACKAGES && \
    apk add --no-cache --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ vips && \
    apk add --no-cache --update --virtual .builder $BUILD_DEPS

So maybe if we remove this, it will work, what do you think? Thanks

@Korridzy
Copy link
Contributor

Korridzy commented Nov 26, 2019

There is a good solution for this issue. The vips package will be installed from community repo and libheif from main.

I'm preparing a PR with this solution. @mul1sh, you can use it to unblock your work on #5281 meanwhile:

# Install general dependencies.
RUN apk add --no-cache --update $PACKAGES && \
apk add --no-cache --update --repository http://dl-cdn.alpinelinux.org/alpine/edge/main/ --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ vips && \
apk add --no-cache --update --virtual .builder $BUILD_DEPS

@Fatima-yo
Copy link
Author

Thank you !
Waiting for it.

@mul1sh
Copy link
Contributor

mul1sh commented Nov 26, 2019

@Korridzy thanks, this seems to work though now it's hanging at the installing vips command i.e. Installing vips (8.8.3-r2) i've restarted the installation severally with no luck :(

@Korridzy
Copy link
Contributor

Yes, it looks like problem is a bit more complex. Containers were created succesfully in my environment. But 'web', 'scheduler' and 'worker' now can't start with similar messages like:

OSError: cannot load library 'libvips.so.42': Error relocating /usr/lib/libheif.so.1: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found.  Additionally, ctypes.util.find_library() did not manage to locate a library called 'libvips.so.42'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pyvips/__init__.py", line 19, in <module>
    import _libvips
ModuleNotFoundError: No module named '_libvips'

Investigation is in process

@octavioamu
Copy link
Contributor

probably related alpinelinux/docker-alpine#49

@octavioamu
Copy link
Contributor

octavioamu commented Nov 26, 2019

Our problem https://gitlab.alpinelinux.org/alpine/aports/issues/10962

https://travis-ci.org/gitcoinco/web/jobs/617023755#L389

@octavioamu
Copy link
Contributor

the blame commit alpinelinux/aports@2f6bc1c

@octavioamu
Copy link
Contributor

ok seems this worked, #5553 you can try that changes locally until we figure out a better solution

@mul1sh
Copy link
Contributor

mul1sh commented Nov 27, 2019

@octavioamu thanks for the follow-up and the Dockerfile update, but still no luck in getting this work even with the command updates. I'm now getting the following error

ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2iyl7n63/secp256k1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2iyl7n63/secp256k1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-63nn0nwo --python-tag cp37
       cwd: /tmp/pip-install-2iyl7n63/secp256k1/
  Complete output (210 lines):
...
  ERROR: Failed building wheel for secp256k1

I think its because of the alpine update.

@octavioamu
Copy link
Contributor

@mul1sh I think you tested #5554 not #5553

@mul1sh
Copy link
Contributor

mul1sh commented Nov 27, 2019

@octavioamu Yes I did because #5554 was merged into the repo whereas #5553 was closed. Anyway thanks for the heads up, let me test again with #5553

@thelostone-mc
Copy link
Member

sorry about that @mul1sh ! goofup at my end

@Fatima-yo could you pull in master and try again ! Hopefully that should work

@Fatima-yo
Copy link
Author

Yes, will do and let you know the results here.

@mul1sh
Copy link
Contributor

mul1sh commented Nov 27, 2019

@thelostone-mc no worries, thanks for the update 🙂 . I'll test later today then.

@thelostone-mc
Copy link
Member

UPDATE: this still seems to be an issue ! mind giving us a day to figure it out ?
I've been trying to build my container all day 😅

@Fatima-yo
Copy link
Author

OK waiting for your ready-steady-go signal

@thelostone-mc
Copy link
Member

thelostone-mc commented Nov 28, 2019

@Fatima-yo + @mul1sh So I've got a working setup over at
#5558. This has been merged in so pull in the latest and rebuild the container.

Figuring out the breaking dependencies wasn't easy and every combination we tried had some issues with it.
Ended up shifting to ubuntu image as opposed to alpine and tested it locally and it works ^_^
It takes a while longer to build but it's a one time setup so meh :P

@Fatima-yo
Copy link
Author

Great!
And funny also, as Ubuntu is my favorite, I run Xubuntu and Ubuntu Studio currently (plus Lubuntu a while ago and now LinuxLite in a small machine I use for YouTube only)

@thelostone-mc
Copy link
Member

When you do get the time , could you pull in the latest master branch and rebuild the container.
If it's good -> I'll go ahead and close this issue

Thanks for reporting it and being super patient ^_^

@Fatima-yo
Copy link
Author

Yeah will do
Not sure if today (almost going to sleep and still got a few issues to close) but tomorrow early morning

@Fatima-yo
Copy link
Author

Fatima-yo commented Nov 29, 2019

Looks like it is working now :-D
Something like an error message in first screenshot but not sure, I let it in your competent hands
Screenshot_2019-11-29_16-51-21
Screenshot_2019-11-29_17-45-15
Screenshot_2019-11-29_17-51-48
Anything else to try?

@Fatima-yo
Copy link
Author

@thelostone-mc kindly check my last comment and tell me if I should test anything else.
Looks as everything is good now.

@mul1sh
Copy link
Contributor

mul1sh commented Nov 30, 2019

No luck for me 😭 , it always exits with an error as shown below. And this after trying to build the image more than 5 times
Screenshot 2019-11-30 at 5 21 58 PM

@Fatima-yo
Copy link
Author

@mul1sh are you sure about having the latest docker version?
I installed it following these instructions:
https://docs.docker.com/install/linux/docker-ce/ubuntu/

@octavioamu
Copy link
Contributor

@mul1sh be sure you run a fresh installation
docker-compose down -v; docker-compose up -d --build;

@mul1sh
Copy link
Contributor

mul1sh commented Nov 30, 2019

@Fatima-yo Yep i'm using the latest docker version 2.10.5

@octavioamu Yes i'm aslo running a fresh installation, infact i'm purging the old containers at every retry and clearing my cache just in case, but no luck it always fails at the above line.

@octavioamu
Copy link
Contributor

As I see on the error seems you are under some vpn or something on your network is blocking the connection. If you have a vpn try using it. Or not sure if your up is fixed, try to reload your modem to see if with another up works

@mul1sh
Copy link
Contributor

mul1sh commented Dec 1, 2019

@octavioamu ok let me try switching ISP's and see if it helps, thanks

@Fatima-yo
Copy link
Author

@thelostone-mc kindly let me know when should I close this issue

@thelostone-mc
Copy link
Member

thelostone-mc commented Dec 2, 2019

@Fatima-yo SOLIDD :D ❤️
Sorry I was with family and hence stayed away from github over the weekend

We are good to close the issue !
Apologize for the rough start but I hope it's smooth sailing from here on :D

@mul1sh I've gotten that error cause of network being blocked !
Use a VPN like @octavioamu and it should be a breeze

@Fatima-yo
Copy link
Author

I am closing issue as it was resolved

@octavioamu
Copy link
Contributor

@mul1sh were you able to solve your problem?

@mul1sh
Copy link
Contributor

mul1sh commented Dec 11, 2019

@octavioamu I was 🙂, thanks.

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

Successfully merging a pull request may close this issue.

6 participants