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

Docker image does not build #44

Open
dgarijo opened this issue May 5, 2022 · 6 comments
Open

Docker image does not build #44

dgarijo opened this issue May 5, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@dgarijo
Copy link
Member

dgarijo commented May 5, 2022

I have tried to build the docker image, but returns in a result.
I thin this is cause by scc not installing properly.

Sending build context to Docker daemon  1.033GB
Step 1/4 : FROM python:3.9
 ---> e2d7fd224b9c
Step 2/4 : RUN git clone https://github.com/oeg-upm/ya2ro
 ---> Running in f448cf6991da
Cloning into 'ya2ro'...
Removing intermediate container f448cf6991da
 ---> 68a29577a5b1
Step 3/4 : RUN cd ya2ro && pip install .
 ---> Running in 4b306cf15461
Processing /ya2ro
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /tmp/pip-standalone-pip-15nvo590/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xeiitwfy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'PyYAML>=6.0' 'bs4>=0.0.1' 'requests>=2.22.0' 'bibtexparser>=1.2.0' 'Pygments>=2.11.2' 'somef>=0.7.2' 'scc @ git+https://github.com/dakixr/scc' metadata-parser
       cwd: None
  Complete output (214 lines):
  Collecting scc@ git+https://github.com/dakixr/scc
    Cloning https://github.com/dakixr/scc to /tmp/pip-install-ymrlek44/scc_a4cfc7828bd443a5b97393e08010206c
    Running command git clone -q https://github.com/dakixr/scc /tmp/pip-install-ymrlek44/scc_a4cfc7828bd443a5b97393e08010206c
    Resolved https://github.com/dakixr/scc to commit 7afb3fc5ba925d2230edc7ea2b70b0bf2ee525c7
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Collecting PyYAML>=6.0
    Downloading PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (661 kB)
  Collecting bs4>=0.0.1
    Downloading bs4-0.0.1.tar.gz (1.1 kB)
  Collecting requests>=2.22.0
    Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
  Collecting bibtexparser>=1.2.0
    Downloading bibtexparser-1.2.0.tar.gz (46 kB)
  Collecting Pygments>=2.11.2
    Downloading Pygments-2.12.0-py3-none-any.whl (1.1 MB)
  Collecting somef>=0.7.2
    Downloading somef-0.8.0-py3-none-any.whl (552 kB)
  Collecting metadata-parser
    Downloading metadata_parser-0.10.5.tar.gz (50 kB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Collecting beautifulsoup4
    Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
  Collecting charset-normalizer~=2.0.0
    Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
  Collecting certifi>=2017.4.17
    Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
  Collecting urllib3<1.27,>=1.21.1
    Downloading urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
  Collecting idna<4,>=2.5
    Downloading idna-3.3-py3-none-any.whl (61 kB)
  Collecting pyparsing>=2.0.3
    Downloading pyparsing-3.0.8-py3-none-any.whl (98 kB)
  Collecting future>=0.16.0
    Downloading future-0.18.2.tar.gz (829 kB)
  Collecting matplotlib==3.5.0
    Downloading matplotlib-3.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (11.2 MB)
  Collecting click-option-group==0.5.3
    Downloading click_option_group-0.5.3-py3-none-any.whl (11 kB)
  Collecting markdown==3.3.6
    Downloading Markdown-3.3.6-py3-none-any.whl (97 kB)
  Collecting rdflib==6.0.2
    Downloading rdflib-6.0.2-py3-none-any.whl (407 kB)
  Collecting pandas==1.3.4
    Downloading pandas-1.3.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
  Collecting validators==0.18.2
    Downloading validators-0.18.2-py3-none-any.whl (19 kB)
  Collecting nltk==3.6.6
    Downloading nltk-3.6.6-py3-none-any.whl (1.5 MB)
  Collecting rdflib-jsonld==0.6.2
    Downloading rdflib_jsonld-0.6.2-py2.py3-none-any.whl (4.0 kB)
  Collecting scikit-learn==1.0
    Downloading scikit_learn-1.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (24.7 MB)
  Collecting numpy==1.21.4
    Downloading numpy-1.21.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
  Collecting textblob==0.17.1
    Downloading textblob-0.17.1-py2.py3-none-any.whl (636 kB)
  Collecting Click==7.0
    Downloading Click-7.0-py2.py3-none-any.whl (81 kB)
  Collecting xgboost==1.5.0
    Downloading xgboost-1.5.0-py3-none-manylinux2014_x86_64.whl (173.5 MB)
  Collecting importlib-metadata>=4.4
    Downloading importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
  Collecting python-dateutil>=2.7
    Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
  Collecting packaging>=20.0
    Downloading packaging-21.3-py3-none-any.whl (40 kB)
  Collecting kiwisolver>=1.0.1
    Downloading kiwisolver-1.4.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
  Collecting fonttools>=4.22.0
    Downloading fonttools-4.33.3-py3-none-any.whl (930 kB)
  Collecting pillow>=6.2.0
    Downloading Pillow-9.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.3 MB)
  Collecting cycler>=0.10
    Downloading cycler-0.11.0-py3-none-any.whl (6.4 kB)
  Collecting setuptools-scm>=4
    Downloading setuptools_scm-6.4.2-py3-none-any.whl (37 kB)
  Collecting joblib
    Downloading joblib-1.1.0-py2.py3-none-any.whl (306 kB)
  Collecting regex>=2021.8.3
    Downloading regex-2022.4.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (763 kB)
  Collecting tqdm
    Downloading tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
  Collecting pytz>=2017.3
    Downloading pytz-2022.1-py2.py3-none-any.whl (503 kB)
  Collecting setuptools
    Using cached setuptools-62.1.0-py3-none-any.whl (1.1 MB)
  Collecting isodate
    Downloading isodate-0.6.1-py2.py3-none-any.whl (41 kB)
  Collecting scipy>=1.1.0
    Downloading scipy-1.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (42.1 MB)
  Collecting threadpoolctl>=2.0.0
    Downloading threadpoolctl-3.1.0-py3-none-any.whl (14 kB)
  Collecting decorator>=3.4.0
    Downloading decorator-5.1.1-py3-none-any.whl (9.1 kB)
  Collecting six>=1.4.0
    Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
  Collecting htmlmin
    Downloading htmlmin-0.1.12.tar.gz (19 kB)
  Collecting inspect4py
    Downloading inspect4py-0.0.1-py3-none-any.whl (54 kB)
  Collecting html2image
    Downloading html2image-2.0.1-py3-none-any.whl (17 kB)
  Collecting mistune
    Downloading mistune-2.0.2-py2.py3-none-any.whl (24 kB)
  Collecting progressbar2
    Downloading progressbar2-4.0.0-py2.py3-none-any.whl (26 kB)
  INFO: pip is looking at multiple versions of xgboost to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of validators to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of textblob to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of scikit-learn to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of rdflib-jsonld to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of rdflib to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of pandas to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of nltk to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of matplotlib to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of markdown to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of click-option-group to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of click to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of somef to determine which version is compatible with other requirements. This could take a while.
  Collecting somef>=0.7.2
    Downloading somef-0.7.2.tar.gz (33.5 MB)
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Installing backend dependencies: started
    Installing backend dependencies: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  INFO: pip is looking at multiple versions of pygments to determine which version is compatible with other requirements. This could take a while.
  Collecting Pygments>=2.11.2
    Downloading Pygments-2.11.2-py3-none-any.whl (1.1 MB)
  INFO: pip is looking at multiple versions of bibtexparser to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
  Collecting requests>=2.22.0
    Downloading requests-2.27.0-py2.py3-none-any.whl (63 kB)
  INFO: pip is looking at multiple versions of xgboost to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of validators to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of textblob to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of scikit-learn to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of rdflib-jsonld to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of rdflib to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of pandas to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of numpy to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of nltk to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of matplotlib to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of markdown to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of click-option-group to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of click to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of somef to determine which version is compatible with other requirements. This could take a while.
    Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
    Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
  Collecting idna<3,>=2.5
    Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
  Collecting chardet<5,>=3.0.2
    Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  INFO: pip is looking at multiple versions of pygments to determine which version is compatible with other requirements. This could take a while.
  Collecting requests>=2.22.0
    Downloading requests-2.25.0-py2.py3-none-any.whl (61 kB)
  Collecting chardet<4,>=3.0.2
    Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
  Collecting requests>=2.22.0
    Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
  Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
    Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
  Collecting requests>=2.22.0
    Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
  INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
    Downloading requests-2.22.0-py2.py3-none-any.whl (57 kB)
  Collecting idna<2.9,>=2.5
    Downloading idna-2.8-py2.py3-none-any.whl (58 kB)
  INFO: pip is looking at multiple versions of bibtexparser to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of bs4 to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
  INFO: pip is looking at multiple versions of pyyaml to determine which version is compatible with other requirements. This could take a while.
  ERROR: Cannot install scc==0.0.1 and somef>=0.7.2 because these package versions have conflicting dependencies.
  
  The conflict is caused by:
      The user requested somef>=0.7.2
      scc 0.0.1 depends on somef>=0.8.0
  
  To fix this you could try to:
  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
  
  ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
  WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
  You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
  ----------------------------------------
WARNING: Discarding file:///ya2ro. Command errored out with exit status 1: /usr/local/bin/python /tmp/pip-standalone-pip-15nvo590/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xeiitwfy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'PyYAML>=6.0' 'bs4>=0.0.1' 'requests>=2.22.0' 'bibtexparser>=1.2.0' 'Pygments>=2.11.2' 'somef>=0.7.2' 'scc @ git+https://github.com/dakixr/scc' metadata-parser Check the logs for full command output.
ERROR: Command errored out with exit status 1: /usr/local/bin/python /tmp/pip-standalone-pip-15nvo590/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-xeiitwfy/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'PyYAML>=6.0' 'bs4>=0.0.1' 'requests>=2.22.0' 'bibtexparser>=1.2.0' 'Pygments>=2.11.2' 'somef>=0.7.2' 'scc @ git+https://github.com/dakixr/scc' metadata-parser Check the logs for full command output.
WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
The command '/bin/sh -c cd ya2ro && pip install .' returned a non-zero code: 1
@dgarijo dgarijo added the bug Something isn't working label May 5, 2022
@davidjsherman
Copy link

@dgarijo It is unfortunate that OEG's Software Catalog Creator (scc) has the same name as https://pypi.org/project/scc/

@davidjsherman
Copy link

Is 820c86c a fix for this issue?

I am able to build a container image with this commit.

@davidjsherman
Copy link

It is unusual that the first step of the Dockerfile is to do a git clone, typically the source code would be in the build context.

Concretely, it unfortunately breaks any fork of the project, since the container image is always built from the original repository, rather than from the code in the fork.

@dgarijo
Copy link
Member Author

dgarijo commented May 5, 2022

@davidjsherman, I just realized on the clash of names. We will probably change it since it's on its early stages.
Regarding the Docker image, I usually like to go through the git route, as it's simpler than assuming the project is downloaded, and then having to copy the files inside the image.
I had not thought about braking the fork, which is true. We'll probably have to fix it too.

@davidjsherman
Copy link

If you are using Docker to build the container image, you can specify a Git repository instead of a directory; Docker will do a clone to get its build context:

% docker build -t ya2ro:latest 'https://github.com/oeg-upm/ya2ro.git#main'
 => [internal] load git source https://github.com/oeg-upm/ya2ro.git#main                                           1.4s
 => [internal] load metadata for docker.io/library/python:3.9                                                      2.9s 
 => [1/4] FROM docker.io/library/python:3.9@sha256:a83c0aa6471527636d7331c30704d0f88e0ab3331bbc460d4ae2e53bbae64  22.6s 
...

If you build the image as part of a continuous integration, then the CI system will do the git clone.

So it isn't necessary to explicitly check out the source in the Dockerfile.

@dgarijo
Copy link
Member Author

dgarijo commented May 5, 2022

Ah! I did not know this. Thanks a lot!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants