waikato-datamining / pytorch

Pytorch related projects and docker images.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build has error on all SAM models

payamahmadvand-stemcell opened this issue · comments

Hi,
I am getting this error when I run docker build -t
The build successful but when I can push to AWS ECR, the status is failed

ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-ntof57v1/wai-pycocotools_abd8711ce43e4884a1a0790541bd2904/setup.py'"'"'; file='"'"'/tmp/pip-install-ntof57v1/wai-pycocotools_abd8711ce43e4884a1a0790541bd2904/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-u5o9qrbi
cwd: /tmp/pip-install-ntof57v1/wai-pycocotools_abd8711ce43e4884a1a0790541bd2904/
Complete output (61 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/pycocotools
copying pycocotools/init.py -> build/lib.linux-x86_64-3.9/pycocotools
copying pycocotools/coco.py -> build/lib.linux-x86_64-3.9/pycocotools
copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-3.9/pycocotools
copying pycocotools/mask.py -> build/lib.linux-x86_64-3.9/pycocotools
running build_ext
building 'pycocotools._mask' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/common
creating build/temp.linux-x86_64-3.9/pycocotools
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/numpy/core/include -Icommon -I/usr/include/python3.9 -c common/maskApi.c -o build/temp.linux-x86_64-3.9/common/maskApi.o
common/maskApi.c: In function ‘rleDecode’:
common/maskApi.c:46:7: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
46 | for( k=0; k<R[i].cnts[j]; k++ ) (M++)=v; v=!v; }}
| ^~~
common/maskApi.c:46:49: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
46 | for( k=0; k<R[i].cnts[j]; k++ ) (M++)=v; v=!v; }}
| ^
common/maskApi.c: In function ‘rleFrPoly’:
common/maskApi.c:166:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
166 | for(j=0; j<k; j++) x[j]=(int)(scale
xy[j
2+0]+.5); x[k]=x[0];
| ^~~
common/maskApi.c:166:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
166 | for(j=0; j<k; j++) x[j]=(int)(scalexy[j2+0]+.5); x[k]=x[0];
| ^
common/maskApi.c:167:3: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
167 | for(j=0; j<k; j++) y[j]=(int)(scalexy[j2+1]+.5); y[k]=y[0];
| ^~~
common/maskApi.c:167:54: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
167 | for(j=0; j<k; j++) y[j]=(int)(scalexy[j2+1]+.5); y[k]=y[0];
| ^
common/maskApi.c: In function ‘rleToString’:
common/maskApi.c:212:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
212 | if(more) c |= 0x20; c+=48; s[p++]=c;
| ^~
common/maskApi.c:212:27: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
212 | if(more) c |= 0x20; c+=48; s[p++]=c;
| ^
common/maskApi.c: In function ‘rleFrString’:
common/maskApi.c:220:3: warning: this ‘while’ clause does not guard... [-Wmisleading-indentation]
220 | while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
| ^~~~~
common/maskApi.c:220:22: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘while’
220 | while( s[m] ) m++; cnts=malloc(sizeof(uint)*m); m=0;
| ^~~~
common/maskApi.c:228:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
228 | if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
| ^~
common/maskApi.c:228:34: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’
228 | if(m>2) x+=(long) cnts[m-2]; cnts[m++]=(uint) x;
| ^~~~
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/local/lib/python3.9/dist-packages/numpy/core/include -Icommon -I/usr/include/python3.9 -c pycocotools/_mask.c -o build/temp.linux-x86_64-3.9/pycocotools/_mask.o
x86_64-linux-gnu-gcc: error: pycocotools/_mask.c: No such file or directory
x86_64-linux-gnu-gcc: fatal error: no input files
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

ERROR: Failed building wheel for wai.pycocotools

Just built it successfully on a 2080 here. Taking a look at the SAM build excerpt below, it is only the wheel build that failed (and the installation then falls back on the legacy install):

...
#8 34.14   gcc: error: pycocotools/_mask.c: No such file or directory
#8 34.14   gcc: fatal error: no input files
#8 34.14   compilation terminated.
#8 34.14   error: command '/usr/bin/gcc' failed with exit code 1
#8 34.14   ----------------------------------------
#8 34.14   ERROR: Failed building wheel for wai.pycocotools
#8 34.14   Running setup.py clean for wai.pycocotools
#8 34.65 Failed to build wai.pycocotools
#8 35.05 Installing collected packages: zipp, python-dateutil, pyparsing, packaging, kiwisolver, importlib-resources, fonttools, cycler, contourpy, tifffile, scipy, PyWavelets, networkx, matplotlib, imageio, cython, wai.pycocotools, scikit-image, opencv-python
#8 41.21     Running setup.py install for wai.pycocotools: started
#8 44.92     Running setup.py install for wai.pycocotools: finished with status 'done'
#8 44.92   DEPRECATION: wai.pycocotools was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
...

Also, why are you not using the pre-built images from docker hub (sam, sam-hq)?

I tried pre-built images from docker hub (cpu) as well. It failed in AWS ECR.
Anyone was able to use AWS ECR to run the SAM images?

We use our images on actual servers, desktops and laptops, not in the cloud (too expensive). I've never used ECR.

What error message did you get when using the pre-built image?

closed due to inactivity