Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix bug in build arm #300

Open
wants to merge 15 commits into
base: developing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Anakin 2.0 And Docker
---
# Anakin 2.0 Docker

## Requirement

Expand Down Expand Up @@ -32,15 +31,18 @@ $./anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Build
```

#### Run docker

```bash
$/usr/bash anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Run
or
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Run
```

When running docker successfully, you can find Anakin source code at /Anakin directory.

### X86 Docker

#### Build Image

```bash
Expand All @@ -60,23 +62,26 @@ $/usr/bash anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Run
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Run

# or
# or
# run docker by docker run command.
# firt find the x86 image you just built.

$docker images

# This command will list all docker images you have built.
# This command will list all docker images you have built.
#Then, find anakin and it's tag. finally, run x86 docker.
# for ubuntu, type anakin:x86_ubuntu16.04-x86 instead.
$docker run -it anakin:x86_centos7-x86 /bin/bash
```

When running docker successfully, you can find Anakin source code at /Anakin directory.

### ARM Docker

We only support arm docker based on centos for now.

#### Build Image

```bash
$/usr/bash anakin_docker_build_and_run.sh -p ARM -o Centos -m Build

Expand All @@ -99,14 +104,16 @@ $./anakin_docker_build_and_run.sh -p ARM -o Centos -m Run

$docker images

# This command will list all docker images you have built.
# This command will list all docker images you have built.
#Then, find anakin and it's tag. finally, run arm docker.

$docker run -it anakin:arm_centos7-armv7 /bin/bash

```

When running docker successfully, you can find Anakin source code at /Anakin directory.

NOTE
If you want to use opencv(only used in Anakin samples), please refer [run on arm](../docs/Manual/run_on_arm_en.md) to install opencv and recompile Anakin
(you just need to run 'Anakin/tools/andrid_build.sh'). You can install it before the arm docker image's building has done successfully. At last, don't forget to commit your changes to the docker image you built.
### NOTE

If you want to use opencv(only used in Anakin samples), please refer [run on arm](../docs/Manual/run_on_arm_en.md) to install opencv and recompile Anakin
(you just need to run 'Anakin/tools/andrid_build.sh'). You can install it before the arm docker image's building has done successfully. At last, don't forget to commit your changes to the docker image you built.
76 changes: 72 additions & 4 deletions docker/README_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Anakin 2.0 And Docker
---
# Anakin 2.0 Docker

## 依赖软件

Expand All @@ -21,7 +20,9 @@ Usage: anakin_docker_build_and_run.sh -p <place> -o <os> -m <Optional>
```

### GPU Docker

#### 构建镜像

```bash
/usr/bash anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Build
或者
Expand All @@ -30,17 +31,84 @@ chmod +x ./anakin_docker_build_and_run.sh
```

#### 运行 docker容器

```bash
/usr/bash anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Run
或者
chmod +x ./anakin_docker_build_and_run.sh
./anakin_docker_build_and_run.sh -p NVIDIA-GPU -o Centos -m Run
```

当docker运行成功后,你可以在./Anakin目录下找到Anakin代码

### X86 Docker

> Not support yet
#### 构建镜像

```bash
$/usr/bash anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Build

# or
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Build
```

#### 运行 docker容器

```bash
$/usr/bash anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Run

# or
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p X86-ONLY -o Centos -m Run

# or
# run docker by docker run command.
# firt find the x86 image you just built.

$docker images

# This command will list all docker images you have built.
#Then, find anakin and it's tag. finally, run x86 docker.
# for ubuntu, type anakin:x86_ubuntu16.04-x86 instead.
$docker run -it anakin:x86_centos7-x86 /bin/bash
```

当docker运行成功后,你可以在./Anakin目录下找到Anakin代码

### ARM Docer

> Not support yet
我们目前只支持centos系统系统下的arm docker

#### 构建镜像

```bash
$/usr/bash anakin_docker_build_and_run.sh -p ARM -o Centos -m Build

# or
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p ARM -o Centos -m Build
```

#### 运行 docker容器

```bash
$/usr/bash anakin_docker_build_and_run.sh -p ARM -o Centos -m Run

# or
$chmod +x ./anakin_docker_build_and_run.sh
$./anakin_docker_build_and_run.sh -p ARM -o Centos -m Run

# or run docker by docker run command.
# firt find the arm image you just built.

$docker images

# This command will list all docker images you have built.
#Then, find anakin and it's tag. finally, run arm docker.

$docker run -it anakin:arm_centos7-armv7 /bin/bash

```

当docker运行成功后,你可以在./Anakin目录下找到Anakin代码
16 changes: 8 additions & 8 deletions docs/Manual/Converter_ch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ Anakin 支持不同框架的模型预测。但由于格式的差别,Anakin 需

## 简介

Anakin 模型转换器输入支持 Caffe 和 Fluid 两种格式的预测模型,模型包含网络结构(model 或 prototxt)和权重参数(param 或 caffemodel)。
Anakin 模型转换器输入支持 Caffe 和 Fluid 两种格式的预测模型,模型包含网络结构(model 或 prototxt)和权重参数(param 或 caffemodel)。

模型转换的输出是一个 bin 文件,它作为 Anakin 框架的 graph 参数导入。
模型转换的输出是一个 bin 文件,它作为 Anakin 框架的 graph 参数导入。

您还可以使用模型转换器的 launch board 功能生成网络结构的 HTML 预览。
您还可以使用模型转换器的 launch board 功能生成网络结构的 HTML 预览。


## 系统要求

- Python 2.7+
- Protobuf 3.1+(务必注意 Python 与系统环境 Protobuf 版本一致)
- PaddlePaddle 0.12.0+ (Fluid 模式下)
- flask, bson, matplotlib, scikit-image
- Protobuf 3.1+ (Make sure that Pip Protobuf is consistent with the system Protobuf version.)
- PaddlePaddle 0.12.0+ (Fluid mode)
- flask, bson, matplotlib, scikit-image
- tkinter


Expand All @@ -39,7 +39,7 @@ OPTIONS:
Server:
ip: 0.0.0.0
port: 8888 # 从一个可用端口访问预览页面
OptimizedGraph: # 仅当您执行完预测并使用 Optimized 功能时,才应打开此项
OptimizedGraph: # 当您使用了 Anakin 框架的 Optimized 功能时,才应该打开此项
enable: OFF
path: /path/to/anakin_optimized_anakin_model/googlenet.anakin.bin.saved
LOGGER:
Expand All @@ -61,7 +61,7 @@ TARGET:
- /
PrototxtPath: /path/to/fluid/inference_model
ModelPath: /path/to/fluid/inference_model
# ...
# ...
```

### 3、转换
Expand Down
2 changes: 1 addition & 1 deletion saber/funcs/attension_lstm.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#endif
#ifdef USE_ARM_PLACE
//todo
//#include "saber/funcs/impl/impl_attension_lstm.h"
#include "saber/funcs/impl/impl_attension_lstm.h"
#endif
namespace anakin {
namespace saber {
Expand Down
2 changes: 1 addition & 1 deletion saber/funcs/sequence_expand.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#endif

#ifdef USE_ARM_PLACE
//#include "saber/funcs/impl/arm/saber_activation.h"
#include "saber/funcs/impl/impl_sequence_expand.h"
#endif

namespace anakin {
Expand Down