Add Compile Using Docker
This commit is contained in:
+3
-12
@@ -2,20 +2,11 @@ FROM ubuntu:18.04
|
|||||||
|
|
||||||
MAINTAINER tunm<tunmxy@163.com>
|
MAINTAINER tunm<tunmxy@163.com>
|
||||||
|
|
||||||
WORKDIR /work
|
|
||||||
COPY . /work
|
|
||||||
COPY 3rdparty_hyper_inspire_op/cmake-3.24.3.tar.gz /root/
|
|
||||||
|
|
||||||
# timezone
|
# timezone
|
||||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||||
RUN echo 'Asia/Shanghai' >/etc/timezone
|
RUN echo 'Asia/Shanghai' >/etc/timezone
|
||||||
|
|
||||||
|
|
||||||
RUN ls 3rdparty_hyper_inspire_op
|
RUN apt-get update
|
||||||
|
RUN apt-get install cmake -y
|
||||||
# && tar -zxvf cmake-3.24.3.tar.gz \
|
RUN apt-get install build-essential -y
|
||||||
# && cd cmake-3.24.3 \
|
|
||||||
# && ./bootstrap \
|
|
||||||
# && make -j$(nproc) \
|
|
||||||
# && sudo make install \
|
|
||||||
# && cmake --version
|
|
||||||
|
|||||||
@@ -240,6 +240,26 @@ Compiled to the: **build/release_android/**,Which contains:
|
|||||||
|
|
||||||
After compiling,Copy**arm64-v8a**and**armeabi-v7a** dirs to **Prj-Android/hyperlpr3/libs**,And compile the **Prj-Android** project to use.
|
After compiling,Copy**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-compose,Build 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
|
### 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.
|
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。
|
完成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示例工程
|
||||||
|
|
||||||
我们提供了一个Android-SDK相关的Demo工程:[hyperlpr3-android-sdk](https://github.com/HyperInspire/hyperlpr3-android-sdk.git),您可以根据需求去编译动态库使用该项目。
|
我们提供了一个Android-SDK相关的Demo工程:[hyperlpr3-android-sdk](https://github.com/HyperInspire/hyperlpr3-android-sdk.git),您可以根据需求去编译动态库使用该项目。
|
||||||
|
|||||||
+2
-2
@@ -2,9 +2,9 @@ version: "3"
|
|||||||
services:
|
services:
|
||||||
build_linux_x86_shared_lib:
|
build_linux_x86_shared_lib:
|
||||||
container_name: hlpr_b_x86
|
container_name: hlpr_b_x86
|
||||||
image: ubuntu:18.04
|
image: hyperlpr_build
|
||||||
volumes:
|
volumes:
|
||||||
- .:/work
|
- .:/work
|
||||||
working_dir: /work
|
working_dir: /work
|
||||||
command: bash command/docker_build_linux_x86_shared_lib.sh
|
command: bash command/build_release_linux_share.sh
|
||||||
tty: true
|
tty: true
|
||||||
|
|||||||
Reference in New Issue
Block a user