当前位置: 首页 > news >正文

linux安装时间太久,为什么在Alpine Linux上安装Pandas需要很长时间

我注意到使用基本操作系统Alpine与CentOS或Debian在Docker容器中安装Pandas和Numpy(它的依赖关系)需要更长的时间.我在下面创建了一个小测试来演示时差.除了Alpine更新和下载构建依赖项以安装Pandas和Numpy的几秒钟之外,为什么setup.py需要比Debian安装多70倍的时间?

有没有办法加速使用Alpine作为基本图像的安装,或者是否有另一个与Alpine相当的基本图像,最好用于像Pandas和Numpy这样的软件包?

Dockerfile.debian

FROM python:3.6.4-slim-jessie

RUN pip install pandas

使用Pandas& amp;构建Debian映像NumPy的:

[PandasDockerTest] time docker build -t debian-pandas -f Dockerfile.debian . --no-cache

Sending build context to Docker daemon 3.072kB

Step 1/2 : FROM python:3.6.4-slim-jessie

---> 43431c5410f3

Step 2/2 : RUN pip install pandas

---> Running in 2e4c030f8051

Collecting pandas

Downloading pandas-0.22.0-cp36-cp36m-manylinux1_x86_64.whl (26.2MB)

Collecting numpy>=1.9.0 (from pandas)

Downloading numpy-1.14.1-cp36-cp36m-manylinux1_x86_64.whl (12.2MB)

Collecting pytz>=2011k (from pandas)

Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)

Collecting python-dateutil>=2 (from pandas)

Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)

Collecting six>=1.5 (from python-dateutil>=2->pandas)

Downloading six-1.11.0-py2.py3-none-any.whl

Installing collected packages: numpy, pytz, six, python-dateutil, pandas

Successfully installed numpy-1.14.1 pandas-0.22.0 python-dateutil-2.6.1 pytz-2018.3 six-1.11.0

Removing intermediate container 2e4c030f8051

---> a71e1c314897

Successfully built a71e1c314897

Successfully tagged debian-pandas:latest

docker build -t debian-pandas -f Dockerfile.debian . --no-cache 0.07s user 0.06s system 0% cpu 13.605 total

Dockerfile.alpine

FROM python:3.6.4-alpine3.7

RUN apk --update add --no-cache g++

RUN pip install pandas

用熊猫和熊猫建立阿尔卑斯山的形象NumPy的:

[PandasDockerTest] time docker build -t alpine-pandas -f Dockerfile.alpine . --no-cache

Sending build context to Docker daemon 16.9kB

Step 1/3 : FROM python:3.6.4-alpine3.7

---> 4b00a94b6f26

Step 2/3 : RUN apk --update add --no-cache g++

---> Running in 4b0c32551e3f

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz

fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz

(1/17) Upgrading musl (1.1.18-r2 -> 1.1.18-r3)

(2/17) Installing libgcc (6.4.0-r5)

(3/17) Installing libstdc++ (6.4.0-r5)

(4/17) Installing binutils-libs (2.28-r3)

(5/17) Installing binutils (2.28-r3)

(6/17) Installing gmp (6.1.2-r1)

(7/17) Installing isl (0.18-r0)

(8/17) Installing libgomp (6.4.0-r5)

(9/17) Installing libatomic (6.4.0-r5)

(10/17) Installing pkgconf (1.3.10-r0)

(11/17) Installing mpfr3 (3.1.5-r1)

(12/17) Installing mpc1 (1.0.3-r1)

(13/17) Installing gcc (6.4.0-r5)

(14/17) Installing musl-dev (1.1.18-r3)

(15/17) Installing libc-dev (0.7.1-r0)

(16/17) Installing g++ (6.4.0-r5)

(17/17) Upgrading musl-utils (1.1.18-r2 -> 1.1.18-r3)

Executing busybox-1.27.2-r7.trigger

OK: 184 MiB in 50 packages

Removing intermediate container 4b0c32551e3f

---> be26c3bf4e42

Step 3/3 : RUN pip install pandas

---> Running in 36f6024e5e2d

Collecting pandas

Downloading pandas-0.22.0.tar.gz (11.3MB)

Collecting python-dateutil>=2 (from pandas)

Downloading python_dateutil-2.6.1-py2.py3-none-any.whl (194kB)

Collecting pytz>=2011k (from pandas)

Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)

Collecting numpy>=1.9.0 (from pandas)

Downloading numpy-1.14.1.zip (4.9MB)

Collecting six>=1.5 (from python-dateutil>=2->pandas)

Downloading six-1.11.0-py2.py3-none-any.whl

Building wheels for collected packages: pandas, numpy

Running setup.py bdist_wheel for pandas: started

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: still running...

Running setup.py bdist_wheel for pandas: finished with status 'done'

Stored in directory: /root/.cache/pip/wheels/e8/ed/46/0596b51014f3cc49259e52dff9824e1c6fe352048a2656fc92

Running setup.py bdist_wheel for numpy: started

Running setup.py bdist_wheel for numpy: still running...

Running setup.py bdist_wheel for numpy: still running...

Running setup.py bdist_wheel for numpy: still running...

Running setup.py bdist_wheel for numpy: finished with status 'done'

Stored in directory: /root/.cache/pip/wheels/9d/cd/e1/4d418b16ea662e512349ef193ed9d9ff473af715110798c984

Successfully built pandas numpy

Installing collected packages: six, python-dateutil, pytz, numpy, pandas

Successfully installed numpy-1.14.1 pandas-0.22.0 python-dateutil-2.6.1 pytz-2018.3 six-1.11.0

Removing intermediate container 36f6024e5e2d

---> a93c59e6a106

Successfully built a93c59e6a106

Successfully tagged alpine-pandas:latest

docker build -t alpine-pandas -f Dockerfile.alpine . --no-cache 0.54s user 0.33s system 0% cpu 16:08.47 total

相关文章:

  • linux source 安装教程,ubuntu下安装source navigator软件
  • linux命令补全原理,Linux命令行自动补全功能详解(实例演示)
  • linux挂载华为存储fc,linux挂载 nfs存储
  • linux定时器王贤才,《linux内核设计与实现》 学习笔记(十七)---设备和模块
  • c语言设计基础张小毅答案,C语言程序设计基础
  • c语言 高字节和高字节运算 低字节和低字节运算,C语言关系运算符和位运算符.ppt...
  • fluent 15 c语言编译器,ANSYS FLUENT 12.x 13.x版下使用Visual Studio 2010编译UDF的设置方法...
  • c语言关键词中英翻译机编程,C语言关键字中英翻译机.doc
  • 复利C语言,C计算复利增长
  • C语言ip地址转换成十六进制,在C ++中将IP地址转换为十六进制的程序
  • c语言中的括号什么意思,C变量声明中的括号是什么意思?
  • android+号码归属地数据库,Android手机号码归属地的查询
  • android音效插件,ViPER4 音效插件
  • android 线控按钮响应,转:android 线控按钮编程
  • 华为鸿蒙系统2020,余承东:4月起华为旗舰手机可陆续升级鸿蒙系统