tensorflow / build

Build-related tools for TensorFlow
Apache License 2.0
271 stars 111 forks source link

latest-jupyter (2.11.1) - error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory #141

Closed FlexDW closed 1 year ago

FlexDW commented 1 year ago

My build stopped working after the latest release.

Dockerfile:

FROM tensorflow/tensorflow:latest-jupyter
RUN pip install scipy
RUN pip install tensorflow-text
RUN pip install tf-models-official
RUN pip install tensorflow-addons

This is the error that I get at the step of installing tf-models-official:

0 124.3 Building wheels for collected packages: kaggle, pycocotools, seqeval, promise
#0 124.3   Building wheel for kaggle (setup.py): started
#0 124.5   Building wheel for kaggle (setup.py): finished with status 'done'
#0 124.5   Created wheel for kaggle: filename=kaggle-1.5.13-py3-none-any.whl size=77717 sha256=a4837ea18a23a8198b0deff4ddf3aa0aca8d28e4224087ea8d5224816262d99b
#0 124.5   Stored in directory: /root/.cache/pip/wheels/e6/8e/67/e07554a720a493dc6b39b30488590ba92ed45448ad0134d253
#0 124.6   Building wheel for pycocotools (pyproject.toml): started
#0 125.3   Building wheel for pycocotools (pyproject.toml): finished with status 'error'
#0 125.3   error: subprocess-exited-with-error
#0 125.3   
#0 125.3   × Building wheel for pycocotools (pyproject.toml) did not run successfully.
#0 125.3   │ exit code: 1
#0 125.3   ╰─> [20 lines of output]
#0 125.3       running bdist_wheel
#0 125.3       running build
#0 125.3       running build_py
#0 125.3       creating build
#0 125.3       creating build/lib.linux-x86_64-cpython-38
#0 125.3       creating build/lib.linux-x86_64-cpython-38/pycocotools
#0 125.3       copying pycocotools/__init__.py -> build/lib.linux-x86_64-cpython-38/pycocotools
#0 125.3       copying pycocotools/cocoeval.py -> build/lib.linux-x86_64-cpython-38/pycocotools
#0 125.3       copying pycocotools/mask.py -> build/lib.linux-x86_64-cpython-38/pycocotools
#0 125.3       copying pycocotools/coco.py -> build/lib.linux-x86_64-cpython-38/pycocotools
#0 125.3       running build_ext
#0 125.3       cythoning pycocotools/_mask.pyx to pycocotools/_mask.c
#0 125.3       building 'pycocotools._mask' extension
#0 125.3       creating build/temp.linux-x86_64-cpython-38
#0 125.3       creating build/temp.linux-x86_64-cpython-38/common
#0 125.3       creating build/temp.linux-x86_64-cpython-38/pycocotools
#0 125.3       x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/tmp/pip-build-env-_j3itgx7/overlay/lib/python3.8/site-packages/numpy/core/include -I./common -I/usr/include/python3.8 -c ./common/maskApi.c -o build/temp.linux-x86_64-cpython-38/./common/maskApi.o -Wno-cpp -Wno-unused-function -std=c99
#0 125.3       /tmp/pip-build-env-_j3itgx7/overlay/lib/python3.8/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-bnls790y/pycocotools_3ce5931933fa4ef99b1f32ec26256829/pycocotools/_mask.pyx
#0 125.3         tree = Parsing.p_module(s, pxd, full_module_name)
#0 125.3       error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
#0 125.3       [end of output]
#0 125.3   
#0 125.3   note: This error originates from a subprocess, and is likely not a problem with pip.
#0 125.3   ERROR: Failed building wheel for pycocotools
#0 125.3   Building wheel for seqeval (setup.py): started
#0 125.7   Building wheel for seqeval (setup.py): finished with status 'done'
#0 125.7   Created wheel for seqeval: filename=seqeval-1.2.2-py3-none-any.whl size=16165 sha256=56b1200949f6d3c324e5a91a1703db2b9effa2190b17179bac51bff412025d85
#0 125.7   Stored in directory: /root/.cache/pip/wheels/ad/5c/ba/05fa33fa5855777b7d686e843ec07452f22a66a138e290e732
#0 125.7   Building wheel for promise (setup.py): started
#0 126.0   Building wheel for promise (setup.py): finished with status 'done'
#0 126.0   Created wheel for promise: filename=promise-2.3-py3-none-any.whl size=21484 sha256=f2167a7e7e14777805719f7546799e6a47b07c7a97504e9069729228b8bade82
#0 126.0   Stored in directory: /root/.cache/pip/wheels/54/aa/01/724885182f93150035a2a91bce34a12877e8067a97baaf5dc8
#0 126.0 Successfully built kaggle seqeval promise
#0 126.0 Failed to build pycocotools
#0 126.0 ERROR: Could not build wheels for pycocotools, which is required to install pyproject.toml-based projects

It works if I pin to 2.11.0

angerson commented 1 year ago

Thanks for your report. The images were missing build-essential and Python-dev, the packages needed for compiling Python source distributions. I've updated the containers and deployed them to the 2.12.0 and latest tags, which should solve your problem.