From 5fe1c8cce1da96e5f357672dac6a10c91531e3c9 Mon Sep 17 00:00:00 2001 From: dong wang Date: Mon, 28 Aug 2023 23:23:47 +0800 Subject: [PATCH] :whale:update Dockfile --- Dockerfile | 30 ++++++++++++++++++++++++++++++ README.md | 10 ++++++++++ README_cn.md | 13 ++++++++++--- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1eea5f2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,30 @@ +FROM mister5ive/ai.deploy.box:1.1.0 +MAINTAINER "Hulk Wang" + +LABEL description="AIDeployBox:A toolbox for deep learning model deployment using C++." + +ARG AiDB_HOME=/aidb +ARG LINUX_LIBS=linux.zip +ARG MODEL=models-lite.zip + +ARG LIBS_URL=https://github.com/TalkUHulk/ai.deploy.box/releases/download/1.1.0/$LINUX_LIBS +ARG MODEL_LITE_URL=https://github.com/TalkUHulk/ai.deploy.box/releases/download/1.1.0/$MODEL + +ADD . $AiDB_HOME/ + +RUN curl -LJO $LIBS_URL \ + && curl -LJO $MODEL_LITE_URL \ + && unzip $LINUX_LIBS -d $AiDB_HOME/libs/ \ + && rm -f $LINUX_LIBS \ + && unzip $MODEL -d $AiDB_HOME/ \ + && rm -f $MODEL \ + && mv $AiDB_HOME/models-lite $AiDB_HOME/models \ + && mkdir $AiDB_HOME/build \ + && cd $AiDB_HOME/build \ + && cmake -DENGINE_MNN=ON -DENGINE_ORT=ON -DENGINE_NCNN=ON -DENGINE_TNN=ON -DENGINE_OPV=ON -DENGINE_PPLite=ON -DBUILD_SAMPLE=ON ../ \ + && make --jobs=$(nproc --all) + +ENV LD_LIBRARY_PATH $AiDB_HOME/libs/linux/x86_64:$AiDB_HOME/libs/linux/x86_64/tnn:$AiDB_HOME/libs:$AiDB_HOME/libs/linux/x86_64/openvino:$AiDB_HOME/libs/linux/x86_64/paddlelite:$LD_LIBRARY_PATH + +WORKDIR $AiDB_HOME/ + diff --git a/README.md b/README.md index 0f8b524..8039ee0 100644 --- a/README.md +++ b/README.md @@ -146,6 +146,16 @@ docker pull mister5ive/ai.deploy.box ### Build +#### Docker(recommend) + +```asm +git lfs clone https://github.com/TalkUHulk/ai.deploy.box.git +cd ai.deploy.box.git +docker build -t aidb-dev . +docker run -it --name aidb-test aidb-dev +``` + +#### From Source code ```asm git lfs clone https://github.com/TalkUHulk/ai.deploy.box.git diff --git a/README_cn.md b/README_cn.md index 41f4c76..30dee1e 100644 --- a/README_cn.md +++ b/README_cn.md @@ -134,15 +134,23 @@
推荐使用docker - ```java docker pull mister5ive/ai.deploy.box ```
- ### Build +#### Docker(推荐) + +```asm +git lfs clone https://github.com/TalkUHulk/ai.deploy.box.git +cd ai.deploy.box.git +docker build -t aidb-dev . +docker run -it --name aidb-test aidb-dev +``` + +#### 源码编译 ```asm git clone https://github.com/TalkUHulk/ai.deploy.box.git @@ -674,7 +682,6 @@ A: 使用带fp16标签的库 Q: kernel for 'conv2d' is not supported by Paddle-lite. A: 转模型--valid_targets =arm, 打开fp16,opt\lib版本对应 - 5. Android OpenVINO Q: How to deploy models in android with openvino([reference](https://github.com/openvinotoolkit/openvino/issues/15006)).