aws / porting-advisor-for-graviton

Apache License 2.0
157 stars 27 forks source link

Not able to run the utility as a container #65

Closed dattakugve closed 6 days ago

dattakugve commented 2 weeks ago

Hi I am trying to build docker image of this project. I am using Docker version 25.0.3, build 4debf41. I am running windows 11.

When I run "docker build -t porting-advisor ." I get below error

`C:\porting-advisor-for-graviton>docker build -t porting-advisor . [+] Building 10.3s (11/13) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 824B 0.0s => [internal] load metadata for public.ecr.aws/amazoncorretto/amazoncorretto:17-al2023 2.4s => [internal] load metadata for public.ecr.aws/amazonlinux/amazonlinux:2023 2.4s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [builder 1/6] FROM public.ecr.aws/amazonlinux/amazonlinux:2023@sha256:58b239881342c76bc01ac4a2bf442e76b7f816a 0.0s => [internal] load build context 0.0s => => transferring context: 10.79kB 0.0s => CACHED [runtime 1/2] FROM public.ecr.aws/amazoncorretto/amazoncorretto:17-al2023@sha256:bfc719be14f82ddb38519 0.0s => CACHED [builder 2/6] RUN yum install java-17-amazon-corretto python3.11 python3.11-pip maven binutils -y && 0.0s => CACHED [builder 3/6] COPY src src/ 0.0s => CACHED [builder 4/6] COPY build.sh setup-environment.sh getBinaryName.sh requirements-build.txt ./ 0.0s => ERROR [builder 5/6] RUN /usr/bin/python3.11 -m venv .venv && source .venv/bin/activate && python3 -m 7.7s

[builder 5/6] RUN /usr/bin/python3.11 -m venv .venv && source .venv/bin/activate && python3 -m pip install -r requirements-build.txt && FILE_NAME=porting-advisor ./build.sh: 2.986 Collecting altgraph==0.17.3 3.344 Downloading altgraph-0.17.3-py2.py3-none-any.whl (21 kB) 3.395 Collecting certifi==2024.7.4 3.414 Downloading certifi-2024.7.4-py3-none-any.whl (162 kB) 3.550 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 163.0/163.0 kB 1.3 MB/s eta 0:00:00 4.014 Collecting coverage==7.2.7 4.035 Downloading coverage-7.2.7-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (232 kB) 4.187 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 232.6/232.6 kB 1.5 MB/s eta 0:00:00 4.226 Collecting idna==3.7 4.250 Downloading idna-3.7-py3-none-any.whl (66 kB) 4.275 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 66.8/66.8 kB 2.5 MB/s eta 0:00:00 4.311 Collecting Jinja2==3.1.4 4.334 Downloading jinja2-3.1.4-py3-none-any.whl (133 kB) 4.418 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 133.3/133.3 kB 1.5 MB/s eta 0:00:00 4.576 Collecting MarkupSafe==2.1.3 4.614 Downloading MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (28 kB) 4.663 Collecting packaging==23.1 4.693 Downloading packaging-23.1-py3-none-any.whl (48 kB) 4.719 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.9/48.9 kB 1.8 MB/s eta 0:00:00 4.967 Collecting progressbar33==2.4 5.016 Downloading progressbar33-2.4.tar.gz (10 kB) 5.026 Preparing metadata (setup.py): started 5.180 Preparing metadata (setup.py): finished with status 'done' 5.265 Collecting pyinstaller==5.13.1 5.281 Downloading pyinstaller-5.13.1-py3-none-manylinux2014_x86_64.whl (660 kB) 5.630 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 660.7/660.7 kB 1.9 MB/s eta 0:00:00 5.688 Collecting pyinstaller-hooks-contrib==2023.6 5.707 Downloading pyinstaller_hooks_contrib-2023.6-py2.py3-none-any.whl (274 kB) 5.806 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 274.3/274.3 kB 3.4 MB/s eta 0:00:00 5.860 Collecting pyparsing==3.1.1 5.894 Downloading pyparsing-3.1.1-py3-none-any.whl (103 kB) 5.934 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.1/103.1 kB 3.1 MB/s eta 0:00:00 6.064 Collecting urllib3==2.2.2 6.087 Downloading urllib3-2.2.2-py3-none-any.whl (121 kB) 6.157 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 121.4/121.4 kB 1.7 MB/s eta 0:00:00 6.303 Collecting XlsxWriter==3.1.2 6.335 Downloading XlsxWriter-3.1.2-py3-none-any.whl (153 kB) 6.392 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 153.0/153.0 kB 2.7 MB/s eta 0:00:00 6.408 Requirement already satisfied: setuptools>=42.0.0 in /.venv/lib64/python3.11/site-packages (from pyinstaller==5.13.1->-r requirements-build.txt (line 9)) (65.5.1) 6.498 Installing collected packages: progressbar33, altgraph, XlsxWriter, urllib3, pyparsing, pyinstaller-hooks-contrib, packaging, MarkupSafe, idna, coverage, certifi, pyinstaller, Jinja2 6.499 DEPRECATION: progressbar33 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 6.499 Running setup.py install for progressbar33: started 6.702 Running setup.py install for progressbar33: finished with status 'done' 7.423 Successfully installed Jinja2-3.1.4 MarkupSafe-2.1.3 XlsxWriter-3.1.2 altgraph-0.17.3 certifi-2024.7.4 coverage-7.2.7 idna-3.7 packaging-23.1 progressbar33-2.4 pyinstaller-5.13.1 pyinstaller-hooks-contrib-2023.6 pyparsing-3.1.1 urllib3-2.2.2 7.561 7.561 [notice] A new release of pip available: 22.3.1 -> 24.2 7.561 [notice] To update, run: pip install --upgrade pip 7.657 /bin/sh: line 1: ./build.sh: cannot execute: required file not found

Dockerfile:11

10 | COPY build.sh setup-environment.sh getBinaryName.sh requirements-build.txt ./ 11 | >>> RUN /usr/bin/python3.11 -m venv .venv && \ 12 | >>> source .venv/bin/activate && \ 13 | >>> python3 -m pip install -r requirements-build.txt && \ 14 | >>> FILE_NAME=porting-advisor ./build.sh 15 |

ERROR: failed to solve: process "/bin/sh -c /usr/bin/python3.11 -m venv .venv && source .venv/bin/activate && python3 -m pip install -r requirements-build.txt && FILE_NAME=porting-advisor ./build.sh" did not complete successfully: exit code: 127`

bhallasaksham commented 2 weeks ago

Thanks for reaching out, @dattakugve . The team is looking into reproducing this issue and will get back to you soon.

bhallasaksham commented 2 weeks ago

Following up on this issue, we were able to run it successfully using the latest version of docker (Docker version 27.1.1 build 6312585) on Windows 11, so maybe its worth trying that. Also, I'm curious to know if there are any local changes or non-standard things set up. Lastly, I would also recommend verifying that the line endings in their file are unix based, not windows based. Seems like there has been some discussion on Stack Exchange about this issue. Hope that helps!