BentoML icon indicating copy to clipboard operation
BentoML copied to clipboard

bug(containerization): conda doesn't work on M1

Open aarnphm opened this issue 3 years ago • 0 comments

Describe the bug

When trying to containerize a bento with conda enable, M1 will fail due to linked library while building psutil.

To reproduce

  1. Enable conda from quick start gallery project
service: "service.py:svc"
labels:
  owner: bentoml-team
  project: gallery
include:
- "*.py"
conda:
  dependencies:
    - scikit-learn
    - pandas
  1. Build with bentoml build
  2. run bentoml containerize iris_classifier:latest

Expected behavior

This passed on AMD64 platform, not arm64

Environment

bentoml: 1.0.0.post3+g3e2847a5 python: 3.10.5 platform: macOS-12.4-arm64-arm-64bit uid:gid: 501:20 conda: 4.13.0 in_conda_env: True

conda_packages
name: base
channels:
  - apple
  - fastchan
  - conda-forge
dependencies:
  - aom=3.4.0=hbe31e94_1
  - appnope=0.1.3=pyhd8ed1ab_0
  - asttokens=2.0.5=pyhd8ed1ab_0
  - backcall=0.2.0=pyh9f0ad1d_0
  - backports=1.0=py_2
  - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0
  - beautifulsoup4=4.11.1=pyha770c72_0
  - brotli-bin=1.0.9=h1c322ee_7
  - brotlipy=0.7.0=py310hf8d0d8f_1004
  - bzip2=1.0.8=h3422bc3_4
  - c-ares=1.18.1=h3422bc3_0
  - ca-certificates=2022.6.15=h4653dfc_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - cctools=973.0.1=h43ef6ec_10
  - cctools_osx-arm64=973.0.1=h8e51184_10
  - cffi=1.15.1=py310he00a5c5_0
  - chardet=5.0.0=py310hbe9552e_0
  - charset-normalizer=2.1.0=pyhd8ed1ab_0
  - colorama=0.4.5=pyhd8ed1ab_0
  - conda=4.13.0=py310hbe9552e_1
  - conda-build=3.21.9=py310hbe9552e_1
  - conda-package-handling=1.8.1=py310hf8d0d8f_1
  - cryptography=37.0.2=py310h94bb23d_0
  - cycler=0.11.0=pyhd8ed1ab_0
  - cymem=2.0.6=py310h1105856_3
  - cython-blis=0.7.8=py310h611a7d1_0
  - dataclasses=0.8=pyhc8e2a94_3
  - decorator=5.1.1=pyhd8ed1ab_0
  - executing=0.8.3=pyhd8ed1ab_0
  - fastcore=1.4.5=pyhd8ed1ab_0
  - fastdownload=0.0.6=py_0
  - fastprogress=1.0.2=py_0
  - ffmpeg=4.4.2=gpl_h263e9c8_102
  - filelock=3.7.1=pyhd8ed1ab_0
  - fonttools=4.33.3=py310h02f21da_0
  - freetype=2.10.4=h17b34a0_1
  - gettext=0.19.8.1=h049c9fb_1008
  - giflib=5.2.1=h27ca646_2
  - glob2=0.7=py_0
  - gmp=6.2.1=h9f76cd9_0
  - gnutls=3.7.6=h27a1928_5
  - h5py=3.6.0=nompi_py310hb8bbf05_100
  - hdf5=1.12.1=nompi_hf9525e8_104
  - icu=70.1=h6b3803e_0
  - idna=3.3=pyhd8ed1ab_0
  - ipython=8.4.0=py310hbe9552e_0
  - jedi=0.18.1=py310hbe9552e_1
  - jinja2=3.1.2=pyhd8ed1ab_1
  - joblib=1.1.0=pyhd8ed1ab_0
  - jpeg=9e=he4db4b2_2
  - kiwisolver=1.4.3=py310hd23d0e8_0
  - krb5=1.19.3=hf9b2bbe_0
  - lame=3.100=h27ca646_1001
  - langcodes=3.3.0=pyhd8ed1ab_0
  - lcms2=2.12=had6a04f_0
  - ld64=609=h954701c_10
  - ld64_osx-arm64=609=h6ce2ded_10
  - lerc=3.0=hbdafb3b_0
  - libarchive=3.5.2=h69ec738_3
  - libblas=3.9.0=15_osxarm64_openblas
  - libbrotlicommon=1.0.9=h1c322ee_7
  - libbrotlidec=1.0.9=h1c322ee_7
  - libbrotlienc=1.0.9=h1c322ee_7
  - libcblas=3.9.0=15_osxarm64_openblas
  - libcurl=7.83.1=h2fcd78c_0
  - libcxx=14.0.6=h04bba0f_0
  - libdeflate=1.12=he4db4b2_0
  - libedit=3.1.20191231=hc8eb9b7_2
  - libev=4.33=h642e427_1
  - libffi=3.4.2=h3422bc3_5
  - libgfortran=5.0.0.dev0=11_0_1_hf114ba7_23
  - libgfortran5=11.0.1.dev0=hf114ba7_23
  - libiconv=1.16=h642e427_0
  - libidn2=2.3.2=h3422bc3_0
  - liblapack=3.9.0=15_osxarm64_openblas
  - liblief=0.11.5=hbdafb3b_1
  - libllvm13=13.0.1=hfd59cb2_2
  - libmamba=0.24.0=h1c735bf_1
  - libmambapy=0.24.0=py310h19f903a_1
  - libnghttp2=1.47.0=he723fca_0
  - libopenblas=0.3.20=openmp_h2209c59_0
  - libpng=1.6.37=hf7e6567_2
  - libprotobuf=3.19.4=hccf11d3_0
  - libsolv=0.7.22=h1280f1d_0
  - libssh2=1.10.0=hb80f160_2
  - libtasn1=4.18.0=he4db4b2_1
  - libtiff=4.4.0=hcbbed22_1
  - libunistring=0.9.10=h3422bc3_0
  - libvpx=1.11.0=hc470f4d_3
  - libwebp=1.2.2=h0d20362_0
  - libwebp-base=1.2.2=h3422bc3_1
  - libxcb=1.13=h9b22ae9_1004
  - libxml2=2.9.14=h035c1df_2
  - libzlib=1.2.12=ha287fd2_1
  - llvm-openmp=14.0.4=hd125106_0
  - lz4-c=1.9.3=hbdafb3b_1
  - lzo=2.10=h642e427_1000
  - mamba=0.24.0=py310h25b57eb_1
  - markupsafe=2.1.1=py310hf8d0d8f_1
  - matplotlib=3.5.2=py310hb6292c7_0
  - matplotlib-base=3.5.2=py310hbeb1b0d_0
  - matplotlib-inline=0.1.3=pyhd8ed1ab_0
  - munkres=1.1.4=pyh9f0ad1d_0
  - murmurhash=1.0.7=py310hb07a4bc_0
  - ncurses=6.3=h07bb92c_1
  - nettle=3.8=h63371fa_0
  - ninja=1.11.0=hf86a087_0
  - onnxruntime=1.11.1=py310hfcd349b_1
  - openh264=2.2.0=h332123e_0
  - openjpeg=2.4.0=h062765e_1
  - openssl=1.1.1q=ha287fd2_0
  - p11-kit=0.24.1=h29577a5_0
  - packaging=21.3=pyhd8ed1ab_0
  - parso=0.8.3=pyhd8ed1ab_0
  - patch=2.7.6=h27ca646_1002
  - pathy=0.6.2=pyhd8ed1ab_0
  - pexpect=4.8.0=pyh9f0ad1d_2
  - pickleshare=0.7.5=py_1003
  - pillow=9.2.0=py310hc9df86f_0
  - preshed=3.0.6=py310h1105856_2
  - prompt-toolkit=3.0.30=pyha770c72_0
  - psutil=5.9.1=py310h02f21da_0
  - pthread-stubs=0.4=h27ca646_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pure_eval=0.2.2=pyhd8ed1ab_0
  - py-lief=0.11.5=py310h1b49c16_1
  - pybind11-abi=4=hd8ed1ab_3
  - pycosat=0.6.3=py310hf8d0d8f_1010
  - pycparser=2.21=pyhd8ed1ab_0
  - pydantic=1.8.2=py310he2143c4_2
  - pygments=2.12.0=pyhd8ed1ab_0
  - pyopenssl=22.0.0=pyhd8ed1ab_0
  - pyparsing=3.0.9=pyhd8ed1ab_0
  - pysocks=1.7.1=py310hbe9552e_5
  - python=3.10.5=h71ab1a4_0_cpython
  - python-dateutil=2.8.2=pyhd8ed1ab_0
  - python-libarchive-c=4.0=py310hbe9552e_1
  - python_abi=3.10=2_cp310
  - pytz=2022.1=pyhd8ed1ab_0
  - re2=2022.06.01=h9a09cb3_0
  - readline=8.1.2=h46ed386_0
  - reproc=14.2.3=h3422bc3_0
  - reproc-cpp=14.2.3=hbdafb3b_0
  - requests=2.28.1=pyhd8ed1ab_0
  - ripgrep=13.0.0=h65448a5_2
  - ruamel_yaml=0.15.80=py310h02f21da_1007
  - scikit-learn=1.1.1=py310h16bc539_0
  - scipy=1.8.1=py310hdb41229_0
  - shellingham=1.4.0=pyh44b312d_0
  - sigtool=0.1.3=h7747421_0
  - six=1.16.0=pyh6c4a22f_0
  - sleef=3.5.1=h156473d_2
  - smart_open=5.2.1=pyhd8ed1ab_0
  - spacy=3.3.1=py310ha6127ee_0
  - spacy-legacy=3.0.9=pyhd8ed1ab_0
  - spacy-loggers=1.0.2=pyhd8ed1ab_0
  - sqlite=3.39.0=h40dfcc0_0
  - srsly=2.4.3=py310h1105856_1
  - stack_data=0.3.0=pyhd8ed1ab_0
  - svt-av1=1.1.0=hbe31e94_1
  - tapi=1100.0.11=he4954df_0
  - tensorflow-deps=2.9.0=0
  - thinc=8.0.17=py310ha6127ee_0
  - threadpoolctl=3.1.0=pyh8a188c0_0
  - tk=8.6.12=he1e0b03_0
  - tornado=6.2=py310h02f21da_0
  - tqdm=4.64.0=pyhd8ed1ab_0
  - traitlets=5.3.0=pyhd8ed1ab_0
  - typer=0.4.1=pyhd8ed1ab_0
  - typing-extensions=4.3.0=hd8ed1ab_0
  - typing_extensions=4.3.0=pyha770c72_0
  - unicodedata2=14.0.0=py310hf8d0d8f_1
  - urllib3=1.26.10=pyhd8ed1ab_0
  - wasabi=0.9.1=pyhd8ed1ab_0
  - wcwidth=0.2.5=pyh9f0ad1d_2
  - x264=1!161.3030=h3422bc3_1
  - x265=3.5=hbc6ce65_3
  - xorg-libxau=1.0.9=h27ca646_0
  - xorg-libxdmcp=1.1.3=h27ca646_0
  - xz=5.2.5=h642e427_1
  - yaml=0.2.5=h3422bc3_2
  - yaml-cpp=0.7.0=h9a09cb3_1
  - zlib=1.2.12=ha287fd2_1
  - zstd=1.5.2=hd705a24_2
  - pip:
    - absl-py==1.1.0
    - aiofiles==0.8.0
    - aiohttp==3.8.1
    - aiosignal==1.2.0
    - alabaster==0.7.12
    - alembic==1.8.0
    - anyio==3.6.1
    - appdirs==1.4.4
    - apscheduler==3.9.1
    - arrow==1.2.2
    - asgiref==3.5.2
    - astroid==2.11.5
    - astunparse==1.6.3
    - async-generator==1.10
    - async-timeout==4.0.2
    - attrs==21.4.0
    - audioread==2.1.9
    - autoflake==1.4
    - autopage==0.5.1
    - babel==2.10.3
    - backoff==1.11.1
    - backports-cached-property==1.0.1
    - backports-shutil-copytree==0.0.0.2
    - bandit==1.7.4
    - bentoctl==0.3.1
    - binaryornot==0.4.4
    - black==22.3.0
    - bleach==5.0.0
    - boto3==1.16.34
    - botocore==1.19.63
    - brotli==1.0.9
    - build==0.8.0
    - bz2file==0.98
    - cachetools==5.2.0
    - catalogue==2.0.7
    - catboost==1.0.6
    - cattrs==22.1.0
    - cerberus==1.3.4
    - certifi==2022.5.18.1
    - chex==0.1.3
    - circus==0.17.1
    - classify-imports==4.1.0
    - click==8.0.4
    - cliff==3.10.1
    - clldutils==3.12.0
    - cloudpickle==2.1.0
    - cmaes==0.8.2
    - cmd2==2.4.1
    - codecarbon==1.2.0
    - codecov==2.1.12
    - colorlog==6.6.0
    - commonmark==0.9.1
    - contextlib2==21.6.0
    - cookiecutter==1.7.3
    - coverage==6.4.1
    - csvw==2.0.0
    - cython==0.29.30
    - dash==2.5.1
    - dash-bootstrap-components==1.1.0
    - dash-core-components==2.0.0
    - dash-html-components==2.0.0
    - dash-table==5.0.0
    - databricks-cli==0.17.0
    - dataclasses-json==0.5.7
    - deepmerge==1.0.1
    - deprecated==1.2.13
    - dill==0.3.4
    - distlib==0.3.4
    - dlinfo==1.2.1
    - dm-tree==0.1.7
    - doc8==0.11.2
    - docker==4.4.4
    - docutils==0.18.1
    - dopamine-rl==3.0.1
    - entrypoints==0.4
    - etils==0.6.0
    - exceptiongroup==1.0.0rc8
    - execnet==1.9.0
    - faiss-cpu==1.7.2
    - fastjsonschema==2.15.3
    - fire==0.4.0
    - flake8==4.0.1
    - flake8-docstrings==1.6.0
    - flask==2.1.2
    - flask-compress==1.12
    - flatbuffers==1.12
    - flax==0.5.0
    - frozenlist==1.3.0
    - fs==2.4.16
    - fs-s3fs==1.1.1
    - fsspec==2022.5.0
    - funcsigs==1.0.2
    - furo==2022.6.4.1
    - future==0.18.2
    - gast==0.4.0
    - gevent==21.12.0
    - gin-config==0.5.0
    - gitdb==4.0.9
    - gitpython==3.1.18
    - google-api-core==2.8.1
    - google-api-python-client==2.50.0
    - google-auth==2.6.6
    - google-auth-httplib2==0.1.0
    - google-auth-oauthlib==0.4.6
    - google-pasta==0.2.0
    - googleapis-common-protos==1.56.2
    - gql==3.3.0
    - graphql-core==3.2.1
    - greenlet==1.1.2
    - grpcio==1.47.0
    - grpcio-tools==1.47.0
    - gunicorn==20.1.0
    - gym==0.24.1
    - gym-notices==0.0.7
    - h11==0.13.0
    - hf-doc-builder==0.4.0.dev0
    - httplib2==0.20.4
    - huggingface-hub==0.7.0
    - hypothesis==6.48.3
    - identify==2.5.1
    - imageio==2.19.3
    - imagesize==1.4.1
    - importlib-metadata==4.12.0
    - importlib-resources==5.7.1
    - iniconfig==1.1.1
    - intervaltree==3.1.0
    - isodate==0.6.1
    - isort==5.10.1
    - itsdangerous==2.1.2
    - jax==0.3.6
    - jaxlib==0.3.5
    - jinja2-time==0.2.0
    - jmespath==0.10.0
    - jsonschema==4.6.0
    - jupyter-core==4.10.0
    - keras==2.9.0
    - keras-preprocessing==1.1.2
    - keyring==23.5.1
    - kfac==0.2.0
    - kubernetes==12.0.1
    - lazy-object-proxy==1.7.1
    - libclang==14.0.1
    - libcst==0.4.5
    - librosa==0.9.2
    - livereload==2.6.3
    - llvmlite==0.38.1
    - logging-tree==1.9
    - mako==1.2.0
    - markdown==3.3.7
    - markdown-it-py==2.1.0
    - marshmallow==3.17.0
    - marshmallow-enum==1.5.1
    - mccabe==0.6.1
    - mdit-py-plugins==0.3.0
    - mdurl==0.1.1
    - mesh-tensorflow==0.1.21
    - mlflow==1.27.0
    - mock==4.0.3
    - mpmath==1.2.1
    - msgpack==1.0.4
    - multidict==6.0.2
    - multiprocess==0.70.12.2
    - mypy-extensions==0.4.3
    - myst-parser==0.18.0
    - nbformat==5.4.0
    - nltk==3.7
    - numba==0.55.2
    - numpy==1.23.1
    - oauth2client==4.1.3
    - oauthlib==3.2.0
    - onnx==1.12.0
    - onnxconverter-common==1.9.0
    - onnxmltools==1.11.1
    - opencv-python==4.5.5.64
    - opentelemetry-api==1.9.0
    - opentelemetry-exporter-jaeger==1.11.0
    - opentelemetry-exporter-jaeger-proto-grpc==1.11.0
    - opentelemetry-exporter-jaeger-thrift==1.11.0
    - opentelemetry-exporter-zipkin==1.11.0
    - opentelemetry-exporter-zipkin-json==1.11.0
    - opentelemetry-exporter-zipkin-proto-http==1.11.0
    - opentelemetry-instrumentation==0.28b0
    - opentelemetry-instrumentation-aiohttp-client==0.28b0
    - opentelemetry-instrumentation-asgi==0.28b0
    - opentelemetry-sdk==1.9.0
    - opentelemetry-semantic-conventions==0.28b0
    - opentelemetry-util-http==0.28b0
    - opt-einsum==3.3.0
    - optax==0.1.2
    - optuna==2.10.1
    - pandas==1.4.2
    - parameterized==0.8.1
    - pathspec==0.9.0
    - pbr==5.9.0
    - pep517==0.12.0
    - phonemizer==3.2.1
    - pint==0.16.1
    - pip==22.1.2
    - pip-tools==6.8.0
    - pkginfo==1.8.2
    - platformdirs==2.5.2
    - plotly==5.9.0
    - pluggy==1.0.0
    - pooch==1.6.0
    - portalocker==2.0.0
    - poyo==0.5.0
    - prettytable==3.3.0
    - prometheus-client==0.13.1
    - prometheus-flask-exporter==0.20.2
    - promise==2.3
    - protobuf==3.19.4
    - py==1.11.0
    - py-cpuinfo==8.0.0
    - pyarrow==8.0.0
    - pyasn1==0.4.8
    - pyasn1-modules==0.2.8
    - pybind11==2.9.2
    - pycodestyle==2.8.0
    - pyctcdecode==0.3.0
    - pydeprecate==0.3.2
    - pydocstyle==6.1.1
    - pyenchant==3.2.2
    - pyflakes==2.4.0
    - pyglet==1.3.2
    - pygtrie==2.4.2
    - pyjwt==2.4.0
    - pylint==2.14.1
    - pynvim==0.4.3
    - pynvml==11.4.1
    - pyperclip==1.8.2
    - pyperf==2.3.1
    - pypng==0.0.21
    - pyre-check==0.9.15
    - pyre-extensions==0.0.29
    - pyrsistent==0.18.1
    - pytest==7.1.2
    - pytest-asyncio==0.18.3
    - pytest-cov==3.0.0
    - pytest-forked==1.4.0
    - pytest-timeout==2.1.0
    - pytest-xdist==2.5.0
    - python-dotenv==0.20.0
    - python-graphviz==0.20
    - python-json-logger==2.0.4
    - python-multipart==0.0.5
    - python-slugify==6.1.2
    - pytorch-lightning==1.6.4
    - pytz-deprecation-shim==0.1.0.post0
    - pyupgrade==2.35.0
    - pyyaml==5.4.1
    - pyzmq==23.2.0
    - querystring-parser==1.2.4
    - ray==1.13.0
    - readme-renderer==35.0
    - regex==2022.6.2
    - reorder-python-imports==3.6.0
    - requests-oauthlib==1.3.1
    - requests-toolbelt==0.9.1
    - resampy==0.2.2
    - responses==0.18.0
    - restructuredtext-lint==1.4.0
    - rfc3986==1.5.0
    - rich==12.5.1
    - rjieba==0.1.11
    - rouge-score==0.0.4
    - rsa==4.8
    - rstfmt==0.0.10
    - s3transfer==0.3.7
    - sacrebleu==1.5.1
    - sacremoses==0.0.53
    - schema==0.7.5
    - seaborn==0.11.2
    - segments==2.2.0
    - semantic-version==2.10.0
    - sentencepiece==0.1.96
    - setup-cfg-fmt==1.20.1
    - setuptools==59.8.0
    - setuptools-rust==0.11.3
    - sigopt==8.5.1
    - simple-di==0.1.5
    - simple-term-menu==0.4.4
    - skl2onnx==1.11.2
    - smmap==5.0.0
    - snakeviz==2.1.1
    - sniffio==1.2.0
    - snowballstemmer==2.2.0
    - sortedcontainers==2.4.0
    - soundfile==0.10.3.post1
    - soupsieve==2.3.2.post1
    - sphinx==5.0.2
    - sphinx-autobuild==2021.3.14
    - sphinx-autodoc-typehints==1.18.2
    - sphinx-basic-ng==0.0.1a11
    - sphinx-click==4.1.0
    - sphinx-copybutton==0.5.0
    - sphinx-design==0.2.0
    - sphinx-inline-tabs==2022.1.2b11
    - sphinx-issues==3.0.1
    - sphinxcontrib-applehelp==1.0.2
    - sphinxcontrib-devhelp==1.0.2
    - sphinxcontrib-fulltoc==1.2.0
    - sphinxcontrib-htmlhelp==2.0.0
    - sphinxcontrib-jsmath==1.0.1
    - sphinxcontrib-qthelp==1.0.3
    - sphinxcontrib-serializinghtml==1.1.5
    - sphinxcontrib-spelling==7.5.0
    - sphinxext-opengraph==0.6.3
    - sqlalchemy==1.4.39
    - sqlparse==0.4.2
    - starlette==0.20.4
    - stevedore==3.5.0
    - sympy==1.10.1
    - tabulate==0.8.10
    - tenacity==8.0.1
    - tensor2tensor==1.15.7
    - tensorboard==2.9.0
    - tensorboard-data-server==0.6.1
    - tensorboard-plugin-wit==1.8.1
    - tensorboardx==2.5.1
    - tensorflow-addons==0.17.1
    - tensorflow-datasets==4.6.0
    - tensorflow-estimator==2.9.0
    - tensorflow-gan==2.1.0
    - tensorflow-hub==0.12.0
    - tensorflow-macos==2.9.2
    - tensorflow-metadata==1.8.0
    - tensorflow-probability==0.7.0
    - termcolor==1.1.0
    - testslide==2.7.0
    - text-unidecode==1.3
    - tf-slim==1.1.0
    - tf2onnx==1.11.0
    - thrift==0.16.0
    - timeout-decorator==0.5.0
    - timm==0.5.4
    - tokenize-rt==4.2.1
    - toml==0.10.2
    - tomli==2.0.1
    - tomlkit==0.11.0
    - toolz==0.11.2
    - torch==1.12.0
    - torch-scatter==2.0.9
    - torchaudio==0.14.0.dev20220603
    - torchmetrics==0.9.0
    - torchvision==0.13.0
    - trax==1.2.4
    - tuna==0.5.11
    - twine==4.0.1
    - typeguard==2.13.3
    - typing-inspect==0.7.1
    - tzdata==2022.1
    - tzlocal==4.2
    - ukkonen==1.0.1
    - uritemplate==4.1.1
    - uvicorn==0.18.2
    - virtualenv==20.15.0
    - watchfiles==0.15.0
    - watchman==0.0.1
    - webencodings==0.5.1
    - websocket-client==1.3.2
    - werkzeug==2.1.2
    - wheel==0.37.1
    - wrapt==1.14.1
    - xgboost==1.6.1
    - xxhash==3.0.0
    - yamllint==1.26.3
    - yarl==1.7.2
    - zipp==3.8.1
    - zope-event==4.5.0
    - zope-interface==5.4.0
prefix: /Users/aarnphm/mambaforge

aarnphm avatar Jul 15 '22 22:07 aarnphm