【发布时间】:2023-01-16 02:47:35
【问题描述】:
opencv-python 的构建轮在构建 docker 映像时保持运行很长时间。可以做些什么来使它运行得更快?
运行 pip 安装 opencv-python
Collecting opencv-python
Downloading opencv-python-4.6.0.66.tar.gz (90.3 MB)
...
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Building wheels for collected packages: opencv-python, numpy
Building wheel for opencv-python (pyproject.toml): started
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
Building wheel for opencv-python (pyproject.toml): still running...
【问题讨论】:
-
你等了多少分钟?
-
@YunusTemurlenk 大约需要 30-45 分钟,我们还在 Dockerfile 中升级了 pip
-
OpenCV 很大。有一些耐心。并且不要在资源受限的设备(如覆盆子)上运行它,或者如果你这样做,预计它需要一段时间。 -- 你为什么需要建造?官方的 opencv-python 包是二进制的,适用于许多架构。
-
@ChristophRackwitz 这是在 t2.large 机器上,它仍然很慢
标签: python-3.x opencv