microsoft / AIforEarth-API-Development

This is an API Framework for AI models to be hosted locally or on the AI for Earth API Platform (https://github.com/microsoft/AIforEarth-API-Platform).
MIT License
74 stars 46 forks source link

build error when installing appinsights #61

Closed rbavery closed 4 years ago

rbavery commented 5 years ago

following the tensorflow example, my Dockerfile runs the following commands and then fails when installing appinsights. The Dockerfile:

# Pull in the AI for Earth Base Image, so we can extract necessary libraries.
FROM mcr.microsoft.com/aiforearth/base-py:latest as ai4e_base

# Use any compatible Ubuntu-based image as your selected base image.
FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
# Copy the AI4E tools and libraries to our container.
COPY --from=ai4e_base /ai4e_api_tools /ai4e_api_tools

# Add the AI4E API source directory to the PATH.
ENV PATH /usr/local/envs/ai4e_py_api/bin:$PATH
# Add the AI4E tools directory to the PYTHONPATH.
ENV PYTHONPATH="${PYTHONPATH}:/ai4e_api_tools"

# Install Miniconda, Flask, Supervisor, uwsgi
RUN ./ai4e_api_tools/requirements/install-api-hosting-reqs.sh

# Install Azure Blob SDK
RUN ./ai4e_api_tools/requirements/install-azure-blob.sh

# Install Application Insights
RUN ./ai4e_api_tools/requirements/install-appinsights.sh

Traceback:

# rave at rave-desktop in ~/CropMask_RCNN/app on git:master ✖︎ [10:02:09]
→ docker build . -t cropmask
Sending build context to Docker daemon  179.2MB
Step 1/23 : FROM mcr.microsoft.com/aiforearth/base-py:latest as ai4e_base
 ---> b96b2ebc8ea3
Step 2/23 : FROM nvidia/cuda:9.0-cudnn7-runtime-ubuntu16.04
 ---> 4ecbea4d32bd
Step 3/23 : COPY --from=ai4e_base /ai4e_api_tools /ai4e_api_tools
 ---> Using cache
 ---> 923a40ede187
Step 4/23 : ENV PATH /usr/local/envs/ai4e_py_api/bin:$PATH
 ---> Using cache
 ---> be940007fd2f
Step 5/23 : ENV PYTHONPATH="${PYTHONPATH}:/ai4e_api_tools"
 ---> Using cache
 ---> c1316f2a8527
Step 6/23 : RUN ./ai4e_api_tools/requirements/install-api-hosting-reqs.sh
 ---> Using cache
 ---> ffbf8e7fc9fa
Step 7/23 : RUN ./ai4e_api_tools/requirements/install-azure-blob.sh
 ---> Using cache
 ---> fe6d7a201594
Step 8/23 : RUN ./ai4e_api_tools/requirements/install-appinsights.sh
 ---> Running in 233013baa44c
Collecting applicationinsights
  Downloading https://files.pythonhosted.org/packages/a1/53/234c53004f71f0717d8acd37876e0b65c121181167057b9ce1b1795f96a0/applicationinsights-0.11.9-py2.py3-none-any.whl (58kB)
Installing collected packages: applicationinsights
Successfully installed applicationinsights-0.11.9
Collecting grpcio
  Downloading https://files.pythonhosted.org/packages/f2/5d/b434403adb2db8853a97828d3d19f2032e79d630e0d11a8e95d243103a11/grpcio-1.22.0-cp36-cp36m-manylinux1_x86_64.whl (2.2MB)
Collecting opencensus==0.6.0
  Downloading https://files.pythonhosted.org/packages/b8/79/466e39c5e81ec105bbbe42a5f85d5a5e27a75d629271af2dcc9408adcb12/opencensus-0.6.0-py2.py3-none-any.whl (124kB)
Collecting opencensus-ext-requests
  Downloading https://files.pythonhosted.org/packages/c7/ff/e12bdbed71ac483b70219b57af483f4783a2ab7b0cd60aea069e8c2d36a0/opencensus_ext_requests-0.1.2-py2.py3-none-any.whl
Collecting opencensus-ext-azure
  Downloading https://files.pythonhosted.org/packages/d4/87/643a1a068f066fa6a4a389526028a5a454d7c40bbdc65ea517e01014b3fa/opencensus_ext_azure-0.7.0-py2.py3-none-any.whl
Requirement already satisfied: six>=1.5.2 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from grpcio) (1.12.0)
Collecting opencensus-context<1.0.0,>=0.1.1 (from opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/2b/b7/720d4507e97aa3916ac47054cd75490de6b6148c46d8c2c487638f16ad95/opencensus_context-0.1.1-py2.py3-none-any.whl
Collecting google-api-core<2.0.0,>=1.0.0 (from opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/71/e5/7059475b3013a3c75abe35015c5761735ab224eb1b129fee7c8e376e7805/google_api_core-1.14.2-py2.py3-none-any.whl (68kB)
Collecting wrapt<2.0.0,>=1.0.0 (from opencensus-ext-requests)
  Downloading https://files.pythonhosted.org/packages/23/84/323c2415280bc4fc880ac5050dddfb3c8062c2552b34c2e512eb4aa68f79/wrapt-1.11.2.tar.gz
Requirement already satisfied: requests>=2.19.0 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from opencensus-ext-azure) (2.22.0)
Collecting psutil>=5.6.3 (from opencensus-ext-azure)
  Downloading https://files.pythonhosted.org/packages/1c/ca/5b8c1fe032a458c2c4bcbe509d1401dca9dda35c7fc46b36bb81c2834740/psutil-5.6.3.tar.gz (435kB)
Collecting contextvars; python_version >= "3.6" and python_version < "3.7" (from opencensus-context<1.0.0,>=0.1.1->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/83/96/55b82d9f13763be9d672622e1b8106c85acb83edd7cc2fa5bc67cd9877e9/contextvars-2.4.tar.gz
Collecting protobuf>=3.4.0 (from google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/dc/0e/e7cdff89745986c984ba58e6ff6541bc5c388dd9ab9d7d312b3b1532584a/protobuf-3.9.0-cp36-cp36m-manylinux1_x86_64.whl (1.2MB)
Requirement already satisfied: setuptools>=34.0.0 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0) (41.0.1)
Collecting google-auth<2.0dev,>=0.4.0 (from google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/c5/9b/ed0516cc1f7609fb0217e3057ff4f0f9f3e3ce79a369c6af4a6c5ca25664/google_auth-1.6.3-py2.py3-none-any.whl (73kB)
Requirement already satisfied: pytz in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0) (2019.2)
Collecting googleapis-common-protos<2.0dev,>=1.6.0 (from google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/eb/ee/e59e74ecac678a14d6abefb9054f0bbcb318a6452a30df3776f133886d7d/googleapis-common-protos-1.6.0.tar.gz
Requirement already satisfied: idna<2.9,>=2.5 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from requests>=2.19.0->opencensus-ext-azure) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from requests>=2.19.0->opencensus-ext-azure) (1.25.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from requests>=2.19.0->opencensus-ext-azure) (2019.6.16)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/envs/ai4e_py_api/lib/python3.6/site-packages (from requests>=2.19.0->opencensus-ext-azure) (3.0.4)
Collecting immutables>=0.9 (from contextvars; python_version >= "3.6" and python_version < "3.7"->opencensus-context<1.0.0,>=0.1.1->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/e3/91/bc4b34993ef77aabfd1546a657563576bdd437205fa24d4acaf232707452/immutables-0.9-cp36-cp36m-manylinux1_x86_64.whl (91kB)
Collecting cachetools>=2.0.0 (from google-auth<2.0dev,>=0.4.0->google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/2f/a6/30b0a0bef12283e83e58c1d6e7b5aabc7acfc4110df81a4471655d33e704/cachetools-3.1.1-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.2.1 (from google-auth<2.0dev,>=0.4.0->google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/be/70/e5ea8afd6d08a4b99ebfc77bd1845248d56cfcf43d11f9dc324b9580a35c/pyasn1_modules-0.2.6-py2.py3-none-any.whl (95kB)
Collecting rsa>=3.1.4 (from google-auth<2.0dev,>=0.4.0->google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/02/e5/38518af393f7c214357079ce67a317307936896e961e35450b70fad2a9cf/rsa-4.0-py2.py3-none-any.whl
Collecting pyasn1<0.5.0,>=0.4.6 (from pyasn1-modules>=0.2.1->google-auth<2.0dev,>=0.4.0->google-api-core<2.0.0,>=1.0.0->opencensus==0.6.0)
  Downloading https://files.pythonhosted.org/packages/6a/6e/209351ec34b7d7807342e2bb6ff8a96eef1fd5dcac13bdbadf065c2bb55c/pyasn1-0.4.6-py2.py3-none-any.whl (75kB)
Building wheels for collected packages: wrapt, psutil, contextvars, googleapis-common-protos
  Building wheel for wrapt (setup.py): started
  Building wheel for wrapt (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/d7/de/2e/efa132238792efb6459a96e85916ef8597fcb3d2ae51590dfd
  Building wheel for psutil (setup.py): started
  Building wheel for psutil (setup.py): finished with status 'error'
  ERROR: Complete output from command /usr/local/envs/ai4e_py_api/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-hl7bjjdm/psutil/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-3c3my185 --python-tag cp36:
  ERROR: running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
  copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
  creating build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
  copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
  running build_ext
  building 'psutil._psutil_linux' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/psutil
  gcc -pthread -B /usr/local/envs/ai4e_py_api/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/envs/ai4e_py_api/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil
  Running setup.py clean for psutil
  Building wheel for contextvars (setup.py): started
  Building wheel for contextvars (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/a5/7d/68/1ebae2668bda2228686e3c1cf16f2c2384cea6e9334ad5f6de
  Building wheel for googleapis-common-protos (setup.py): started
  Building wheel for googleapis-common-protos (setup.py): finished with status 'done'
  Stored in directory: /root/.cache/pip/wheels/9e/3d/a2/1bec8bb7db80ab3216dbc33092bb7ccd0debfb8ba42b5668d5
Successfully built wrapt contextvars googleapis-common-protos
Failed to build psutil
ERROR: opencensus-ext-azure 0.7.0 has requirement opencensus<1.0.0,>=0.7.0, but you'll have opencensus 0.6.0 which is incompatible.
Installing collected packages: grpcio, immutables, contextvars, opencensus-context, protobuf, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, googleapis-common-protos, google-api-core, opencensus, wrapt, opencensus-ext-requests, psutil, opencensus-ext-azure
  Running setup.py install for psutil: started
    Running setup.py install for psutil: finished with status 'error'
    ERROR: Complete output from command /usr/local/envs/ai4e_py_api/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-hl7bjjdm/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-q2u74ciq/install-record.txt --single-version-externally-managed --compile:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/psutil
    copying psutil/_psaix.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_common.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_compat.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/__init__.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_psosx.py -> build/lib.linux-x86_64-3.6/psutil
    copying psutil/_psposix.py -> build/lib.linux-x86_64-3.6/psutil
    creating build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/runner.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.6/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.6/psutil/tests
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/psutil
    gcc -pthread -B /usr/local/envs/ai4e_py_api/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=563 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/local/envs/ai4e_py_api/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/local/envs/ai4e_py_api/bin/python -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-hl7bjjdm/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-q2u74ciq/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-hl7bjjdm/psutil/
The command '/bin/sh -c ./ai4e_api_tools/requirements/install-appinsights.sh' returned a non-zero code: 1
yangsiyu007 commented 5 years ago

@pflickin can you please take a look at this? Has the public Docker image been updated?