Add Compile Using Docker

master
tunm 2 years ago
parent 3adc5f24dc
commit 7fdbcc5a74

@ -2,20 +2,11 @@ FROM ubuntu:18.04
MAINTAINER tunm<tunmxy@163.com>
WORKDIR /work
COPY . /work
COPY 3rdparty_hyper_inspire_op/cmake-3.24.3.tar.gz /root/
# timezone
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
RUN echo 'Asia/Shanghai' >/etc/timezone
RUN ls 3rdparty_hyper_inspire_op
# && tar -zxvf cmake-3.24.3.tar.gz \
# && cd cmake-3.24.3 \
# && ./bootstrap \
# && make -j$(nproc) \
# && sudo make install \
# && cmake --version
RUN apt-get update
RUN apt-get install cmake -y
RUN apt-get install build-essential -y

@ -240,6 +240,26 @@ Compiled to the: **build/release_android/**Which contains
After compilingCopy**arm64-v8a**and**armeabi-v7a** dirs to **Prj-Android/hyperlpr3/libs**And compile the **Prj-Android** project to use.
### Compile with Docker
If you need to compile with docker, we provide a few ways to compile:
#### Use the Compiled Linux-x86 Shared Library
You need to install docker and docker-composeBuild Image for **hyperlpr_build**:
```Bash
docker build -t hyperlpr_build .
```
Start compiling the shared library:
```Bash
docker-compose up build_linux_x86_shared_lib
```
Build dir: **build/linux**
### Android SDK Demo
We have provided a demo project from the Android SDK source: [hyperlpr3-android-sdk](https://github.com/HyperInspire/hyperlpr3-android-sdk.git)You can compile the shared library and use the project as needed.

@ -243,6 +243,26 @@ sh command/build_release_android_share.sh
完成Android的动态库编译后将**arm64-v8a**和**armeabi-v7a**文件夹放置于子项目路径**Prj-Android/hyperlpr3/libs**中再编译android项目即可使用。**Prj-Android**项目中已内置hyperlpr3的SDK与使用demo。
### 使用Docker进行构建
如果你需要使用docker编译我们提供了几种编译方法:
#### Use the Compiled Linux-x86 Shared Library
你需要提前安装好docker和docker-compose并执行脚本构建**hyperlpr_build**的镜像:
```Bash
docker build -t hyperlpr_build .
```
开始编译动态库:
```Bash
docker-compose up build_linux_x86_shared_lib
```
编译目录: **build/linux**
### Android-SDK示例工程
我们提供了一个Android-SDK相关的Demo工程[hyperlpr3-android-sdk](https://github.com/HyperInspire/hyperlpr3-android-sdk.git),您可以根据需求去编译动态库使用该项目。

@ -2,9 +2,9 @@ version: "3"
services:
build_linux_x86_shared_lib:
container_name: hlpr_b_x86
image: ubuntu:18.04
image: hyperlpr_build
volumes:
- .:/work
working_dir: /work
command: bash command/docker_build_linux_x86_shared_lib.sh
command: bash command/build_release_linux_share.sh
tty: true

Loading…
Cancel
Save