跳转到主要内容

由ICRAR创建的daliuge-engine的nifty网格组件

项目描述

dlg-nifty-components

codecov CI Code style: black

dlg-nifty-components包含了一系列针对射电干涉测量数据集的cpu和gpu nifty网格/去网格实现。

安装

安装方式有多种,具体取决于您打算如何运行DALiuGE引擎,直接在虚拟环境(主机)中运行或在docker容器内运行。您也可以从PyPI(最新发布版)安装它。

从PyPI安装

先决条件

以下包在安装前是必需的,以便dlg-nifty-components可以编译其依赖项

  • g++
  • python3-dev
  • numpy
  • cuda-libraries-dev

DALiuGE Engine Python App在Docker容器中

为了开发目的,最好将dlg-nifty-components作为Python应用安装并运行,以便快速重新编译动态链接的二进制文件。为此,您必须首先在daliuge-common或daliuge-engine中安装一个cuda版本,然后安装python-dev、numpy和g++。然后,daliuge-nifty-components将编译并安装wagg以实现cuda加速。

daliuge-common/Dockerfile.dev

RUN apt install -y wget gnupg2 software-properties-common
RUN mkdir -p /code && cd /code && \
    wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin && \
    mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 && \
    apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub && \
    add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" && \
    apt update

RUN DEBIAN_FRONTEND=noninteractive apt -y --no-install-recommends install \
    cuda-minimal-build-11-2 cuda-libraries-11-2 cuda-libraries-dev-11-2 && \
    ln -s /usr/local/cuda-11.2 /usr/local/cuda && \
    ln -s /usr/local/cuda/targets/x86_64-linux/lib /usr/local/cuda/lib && \
    ln -s /usr/local/cuda/targets/x86_64-linux/include /usr/local/cuda/include

daliuge-engine/Dockerfile.dev

RUN apt install -y python3-dev g++

run_engine.sh

# append configured nvidia-docker arguments here, e.g.
DOCKER_OPTS=$DOCKER_OPTS --gpus=all --privileged

dlg-nifty-components可以在DALiuGE引擎运行之前或之后安装

docker exec -t daliuge-engine bash -c 'pip install --prefix=$DLG_ROOT/code dlg_nifty_components'

EAGLE调色板

可以使用以下命令在本地方便地生成EAGLE .palette文件

bash ./build_palatte.sh

用法

Python

例如,当您指定时,MS2DirtyApp组件将可用于引擎

from daliuge_component_nifty import MS2DirtyApp

MS2DirtyApp('a','a')

在Python分支组件的AppClass字段中。与这些组件关联的EAGLE调色板也会生成,可以直接加载到EAGLE中。在这种情况下,所有字段都为相应组件正确填充。

DALiuGE Docker应用程序

可选:构建容器镜像作为daliuge docker应用程序使用

docker build -t dlg-nifty-components -f ./Containerfile .

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。

源分布

dlg_nifty_components-1.1.0.tar.gz (10.1 kB 查看散列)

上传时间

构建分布

dlg_nifty_components-1.1.0-py3-none-any.whl (10.9 kB 查看散列)

上传时间 Python 3

由以下提供支持