簡體   English   中英

在兩台不同的機器上構建相同的 dockerfile。 一個正確構建並運行,另一個使用pip安裝python包時出錯

[英]Same dockerfile built on two different machines. One builds correctly and runs, the other gets an error installing a python package using pip

我在我的機器上構建 docker 文件時遇到問題,但它在另一台機器上正確構建。

這是 DockerFile:

從張量流/張量流:2.3.0-gpu-jupyter

RUN apt-get update && \ 
apt-get install -y ffmpeg && \ 
pip install pyroomacoustics

在一台機器上它正確構建沒有錯誤,但在我的計算機上我在pyroomacoustics的pip安裝過程中出現錯誤。 我也在我的 macbook 上嘗試過這個,但它失敗了,出現了同樣的錯誤。另外兩個人在他們的機器上為我運行了它,它對他們很好。 我很困惑為什么會發生這種情況。

這是錯誤:

from pyroomacoustics) (1.18.5)
Building wheels for collected packages: pyroomacoustics
  Building wheel for pyroomacoustics (PEP 517): started
  Building wheel for pyroomacoustics (PEP 517): still running...
  Building wheel for pyroomacoustics (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmprd5bmv1v
       cwd: /tmp/pip-install-m7cvkov3/pyroomacoustics
  Complete output (119 lines):
  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/pyroomacoustics
  copying pyroomacoustics/recognition.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/utilities.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/windows.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/metrics.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/version.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/soundsource.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/beamforming.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/multirate.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/room.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/parameters.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/sync.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  copying pyroomacoustics/acoustics.py -> build/lib.linux-x86_64-3.6/pyroomacoustics
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/grid.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/frida.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/doa.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/waves.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/srp.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/utils.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/tops.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/detect_peaks.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/music.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/tools_fri_doa_plane.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/plotters.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  copying pyroomacoustics/doa/cssm.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/doa
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/util.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/rls.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/adaptive_filter.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/subband_lms.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/data_structures.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  copying pyroomacoustics/adaptive/lms.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/adaptive
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/transform
  copying pyroomacoustics/transform/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/transform
  copying pyroomacoustics/transform/stft.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/transform
  copying pyroomacoustics/transform/dft.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/transform
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/delay_calibration.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/physics.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/deconvolution.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/measure_ir.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/localization.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/point_cloud.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/rt60.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  copying pyroomacoustics/experimental/signals.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/experimental
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/utils.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/cmu_arctic.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/timit.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/base.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  copying pyroomacoustics/datasets/google_speech_commands.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/datasets
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/ilrma.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/auxiva.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/trinicon.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/fastmnmf.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/sparseauxiva.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  copying pyroomacoustics/bss/common.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/bss
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/denoise
  copying pyroomacoustics/denoise/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/denoise
  copying pyroomacoustics/denoise/spectral_subtraction.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/denoise
  copying pyroomacoustics/denoise/subspace.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/denoise
  copying pyroomacoustics/denoise/iterative_wiener.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/denoise
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/phase
  copying pyroomacoustics/phase/__init__.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/phase
  copying pyroomacoustics/phase/gl.py -> build/lib.linux-x86_64-3.6/pyroomacoustics/phase
  copying pyroomacoustics/build_rir.pyx -> build/lib.linux-x86_64-3.6/pyroomacoustics
  creating build/lib.linux-x86_64-3.6/pyroomacoustics/data
  copying pyroomacoustics/data/materials.json -> build/lib.linux-x86_64-3.6/pyroomacoustics/data
  running build_ext
  creating tmp
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmpob74w7b2.cpp -o tmp/tmpob74w7b2.o -std=c++14
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c /tmp/tmphu4obqnd.cpp -o tmp/tmphu4obqnd.o -fvisibility=hidden
  cythoning pyroomacoustics/build_rir.pyx to pyroomacoustics/build_rir.c
  building 'pyroomacoustics.libroom' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/pyroomacoustics
  creating build/temp.linux-x86_64-3.6/pyroomacoustics/libroom_src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -Ipyroomacoustics/libroom_src -I/tmp/pip-build-env-dghh1s3w/overlay/lib/python3.6/site-packages/pybind11/include -I/tmp/pip-build-env-dghh1s3w/overlay/lib/python3.6/site-packages/pybind11/include -Ipyroomacoustics/libroom_src/ext/eigen -I/usr/include/python3.6m -c pyroomacoustics/libroom_src/libroom.cpp -o build/temp.linux-x86_64-3.6/pyroomacoustics/libroom_src/libroom.o -DEIGEN_MPL2_ONLY -Wall -O3 -DEIGEN_NO_DEBUG -DVERSION_INFO="0.4.1" -std=c++14 -fvisibility=hidden
  In file included from pyroomacoustics/libroom_src/ext/eigen/Eigen/Core:450:0,
                   from /tmp/pip-build-env-dghh1s3w/overlay/lib/python3.6/site-packages/pybind11/include/pybind11/eigen.h:36,
                   from pyroomacoustics/libroom_src/libroom.cpp:30:
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h: In member function ‘std::tuple<Eigen::Matrix<float, D, 1, (AutoAlign | (((((int)D) == 1) && (1 != 1)) ? RowMajor : (((1 == 1) && (((int)D) != 1)) ? ColMajor :  ColMajor))), D, 1>, int, float> Room<D>::next_wall_hit(Vectorf<D>&, Vectorf<D>&, bool) [with long unsigned int D = 2]’:
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       DenseStorage(const DenseStorage& other) : m_data(other.m_data) {
                                                                    ^
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘*((void*)& result +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h: In member function ‘std::tuple<Eigen::Matrix<float, D, 1, (AutoAlign | (((((int)D) == 1) && (1 != 1)) ? RowMajor : (((1 == 1) && (((int)D) != 1)) ? ColMajor :  ColMajor))), D, 1>, int, float> Room<D>::next_wall_hit(Vectorf<D>&, Vectorf<D>&, bool) [with long unsigned int D = 3]’:
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘result’ may be used uninitialized in this function [-Wmaybe-uninitialized]
       DenseStorage(const DenseStorage& other) : m_data(other.m_data) {
                                                                    ^
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘*((void*)& result +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  pyroomacoustics/libroom_src/ext/eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘*((void*)& result +8)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  In file included from pyroomacoustics/libroom_src/room.hpp:254:0,
                   from pyroomacoustics/libroom_src/libroom.cpp:38:
  pyroomacoustics/libroom_src/room.cpp: In member function ‘bool Room<D>::is_visible_dfs(Vectorf<D>&, ImageSource<D>&) [with long unsigned int D = 2]’:
  pyroomacoustics/libroom_src/room.cpp:374:18: warning: ‘*((void*)& intersection +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         Vectorf<D> intersection;
                    ^~~~~~~~~~~~
  pyroomacoustics/libroom_src/room.cpp:374:18: warning: ‘intersection’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  x86_64-linux-gnu-gcc: internal compiler error: Killed (program cc1plus)
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
  /tmp/pip-build-env-dghh1s3w/overlay/lib/python3.6/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-m7cvkov3/pyroomacoustics/pyroomacoustics/build_rir.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 4
  ERROR: Failed building wheel for pyroomacoustics
Failed to build pyroomacoustics
ERROR: Could not build wheels for pyroomacoustics which use PEP 517 and cannot be installed directly

有誰知道為什么會發生這種情況? 由於它們是使用相同的 Dockerfile 構建的,因此我假設如果它可以在一台機器上運行,那么它也可以在其他所有機器上運行。

我以前遇到過這種情況,當時已經在一台舊版本的機器上下載了一個中間圖像。 您可以嘗試刪除所有 docker 映像並重新干凈地重建。 嘗試docker system prune

正如 Anthony Sottile 在上述評論中所述,這是一個內存問題。 我在 docker 設置中增加了內存限制並且它起作用了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM