Python 3.x 在docker中从源代码构建numpy
大家好,我正试图在docker容器中从源代码构建numpy。 这是我的Dockerfile:Python 3.x 在docker中从源代码构建numpy,python-3.x,numpy,docker,Python 3.x,Numpy,Docker,大家好,我正试图在docker容器中从源代码构建numpy。 这是我的Dockerfile: FROM debian:testing MAINTAINER Dr Suman Khanal <suman81765@gmail.com> LABEL updated_at '2017-07-26' WORKDIR / RUN apt-get update \ && apt-get install -y gnupg git wget build-essential pytho
FROM debian:testing
MAINTAINER Dr Suman Khanal <suman81765@gmail.com>
LABEL updated_at '2017-07-26'
WORKDIR /
RUN apt-get update \
&& apt-get install -y gnupg git wget build-essential python3 python3-dev
python3-setuptools python3-pip libatlas3-base libatlas-dev libatlas-base-dev
liblapack-dev libblas-common libblas3 libblas-dev cython
RUN git clone https://github.com/numpy/numpy.git
WORKDIR /numpy
RUN python3 setup.py build --fcompiler=gnu95 install
CMD ["numpy"]
来自debian的:测试
维护人员Suman Khanal博士
标签更新日期:2017-07-26
WORKDIR/
运行apt获取更新\
&&apt get install-y gnupg git wget build-essential python3 python3开发
python3设置工具python3 pip libatlas3 base libatlas dev libatlas base dev
liblapack dev libblas common libblas 3 libblas dev cython
运行git克隆https://github.com/numpy/numpy.git
WORKDIR/numpy
运行python3 setup.py构建--fcompiler=gnu95安装
CMD[“numpy”]
但它抛出了这个错误。
Build失败:命令'/bin/sh-c python3 setup.py Build--fcompiler=gnu95 install'返回非零代码:1
有什么帮助吗
非常感谢,
Suman这里正在工作
Dockerfile
FROM debian:testing
MAINTAINER Dr Suman Khanal <suman81765@gmail.com>
LABEL updated_at '2017-07-26'
WORKDIR /
RUN apt-get update \
&& apt-get install -y gnupg git wget build-essential python3 python3-dev \
&& apt-get install -y python3-setuptools python3-pip libatlas3-base \
&& apt-get install -y libatlas-dev libatlas-base-dev libblas3 libblas-dev cython
RUN git clone https://github.com/numpy/numpy.git
WORKDIR /numpy
RUN python3 setup.py build --fcompiler=gnu95 install
RUN pip3 install nose
CMD ["python3", "/numpy/numpy/tests/test_ctypeslib.py"]
我也不知道你想要用CMD[“numpy”]实现什么,因为它是目录。我添加了安装nose
b/c,这是numpy测试所必需的
您可以在docker中测试和使用numpy:
docker exec -it test-numpy bash
这里是正在工作的
Dockerfile
FROM debian:testing
MAINTAINER Dr Suman Khanal <suman81765@gmail.com>
LABEL updated_at '2017-07-26'
WORKDIR /
RUN apt-get update \
&& apt-get install -y gnupg git wget build-essential python3 python3-dev \
&& apt-get install -y python3-setuptools python3-pip libatlas3-base \
&& apt-get install -y libatlas-dev libatlas-base-dev libblas3 libblas-dev cython
RUN git clone https://github.com/numpy/numpy.git
WORKDIR /numpy
RUN python3 setup.py build --fcompiler=gnu95 install
RUN pip3 install nose
CMD ["python3", "/numpy/numpy/tests/test_ctypeslib.py"]
我也不知道你想要用CMD[“numpy”]实现什么,因为它是目录。我添加了安装nose
b/c,这是numpy测试所必需的
您可以在docker中测试和使用numpy:
docker exec -it test-numpy bash
谢谢,它起作用了。但是我不能理解这个命令
CMD[“python3”,“/numpy/numpy/tests/tests\u ctypeslib.py”]
。你能解释一下吗?@Suman它只是在运行numpy的测试,以确定它是否有效。您可以定义自己的命令或任何您需要的命令,以满足您的需求。谢谢,它正在工作。但是我不能理解这个命令CMD[“python3”,“/numpy/numpy/tests/tests\u ctypeslib.py”]
。你能解释一下吗?@Suman它只是在运行numpy的测试,以确定它是否有效。您可以定义自己的命令或满足需求所需的任何内容。