Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/352.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在dockerfile中用python安装pdal?_Python_Docker_Pip_Dockerfile_Apt Get - Fatal编程技术网

如何在dockerfile中用python安装pdal?

如何在dockerfile中用python安装pdal?,python,docker,pip,dockerfile,apt-get,Python,Docker,Pip,Dockerfile,Apt Get,我有自己的dockerfile,它使用python和gdal以及其他几个包创建了一个图像: FROM geodata/gdal:2.1.2 USER root RUN apt-get update && apt-get install -y \ build-essential \ gfortran \ libatlas-base-dev \ python-pip \ python-dev \

我有自己的dockerfile,它使用python和gdal以及其他几个包创建了一个图像:

FROM geodata/gdal:2.1.2

USER root

RUN apt-get update && apt-get install -y \
       build-essential \
       gfortran \
       libatlas-base-dev \
       python-pip \
       python-dev \
       libxft-dev libfreetype6 libfreetype6-dev

RUN apt-get install -y python-tk
RUN pip install \
    numpy \
    matplotlib \
    scipy \
    click \
    Pillow \
    scikit-image \
    Cython \
    packaging
RUN apt-get install -y liblas-c3
RUN apt-get install pdal
RUN pip install liblas
RUN pip install laspy
RUN pip install pdal


WORKDIR /data
VOLUME /data
我只是想安装pdal,请注意dockerfile中的两行:

RUN apt-get install pdal
RUN pip install pdal
但它似乎不起作用。当我尝试构建映像时,它只会写入错误消息:

Step 9 : RUN apt-get install pdal
 ---> Running in b7d7f128024e
Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package pdal
The command '/bin/sh -c apt-get install pdal' returned a non-zero code: 100

我似乎不知道如何将pdal添加到映像中,他们的hp只说明如何下载docker并将pdal作为一个单独的映像来获取,这不是很有帮助,因为我需要将它与所有其他python包一起放在我自己的映像中!如何做到这一点???

修改您的Dockerfile以便只运行一次,例如,请参阅您可以使用
RUN apt get install pdal\&pip install pdal将两行分组如果您遇到问题,只要apt get install没有找到pdaldid,您就可以尝试他们在您提供的链接上所说的内容
docker run-v/c/Users/hobu:/data pdal/pdal:1.5 pdal info/data/autzen.laz-p 0
?我尝试在一次运行中编写它们,但我只得到了一个错误:E:无法找到包pdal E:无法找到包。正如问题中所述,我不能只使用pdal/pdal:1.5映像,因为它没有我需要的其他python包,而且我也不能添加自己的python脚本。这就是我制作自己dockerfile的原因。你确定使用geodata/gdal:2.1.2中的
意味着你有这个软件包吗?可能你应该先安装git,然后安装
git clonehttps://github.com/PDAL/PDAL.git pdal
因此,请参见从源代码、构建和清理安装Dockerfile的示例