Skip to content
Merged
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ MegFlow 是一个面向视觉应用的流式计算框架, 目标是简单、高
* how to build and run
* [build with docker](docs/how-to-build-and-run/build-with-docker.zh.md)
* [build from source](docs/how-to-build-and-run/build-from-source.zh.md)
* [build on win10](docs/how-to-build-and-run/build-on-win10.zh.md)
* [generate rtsp](docs/how-to-build-and-run/generate-rtsp.zh.md)
* how to use
* [add my first service](docs/how-to-add-my-service/01-single-classification-model.zh.md)
Expand All @@ -35,7 +36,7 @@ MegFlow 是一个面向视觉应用的流式计算框架, 目标是简单、高

| 系统环境 | 支持情况 |
| - | - |
| Windows 10 WSL ubuntu18.04 | ✔️ |
| Windows 10 docker | ✔️ |
| x86 Ubuntu16.04 有 GPU | ✔️ |
| x86 Ubuntu18.04 无 GPU | ✔️ |
| x86 macos | ✔️ |
Expand Down
59 changes: 59 additions & 0 deletions docs/how-to-build-and-run/build-on-win10.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Build on win10

## 下载模型包
docker 运行方式,建议把模型包下好,
解压备用。


| 云盘 | google drive | dropbox |
| - | - | - |
| [链接](https://pan.baidu.com/s/1SoxHZjdWyPRIAwfcHWUQTQ) 提取码: ebcn | [google](https://drive.google.com/file/d/1EwMJFjNp2kuNglutoleZOVsqccSOW2Z4/view?usp=sharing) | [dropbox](https://www.dropbox.com/s/akhkxedyo2ubmys/models.zip?dl=0) |


## 安装 wsl2

[安装文档](https://docs.microsoft.com/zh-cn/windows/wsl/install-win10) 已经非常详细,核心是安装 Linux 内核更新包。完成后第 6 步中的 Linux 分发应该可以正常运行。

## 安装 docker
下载 [windows docker 客户端](https://www.docker.com/products/docker-desktop) 并安装。docker 依赖 wsl2,Docker Desktop 启动正常没有报 fail 即可。

## 安装 git

下载安装 [git 客户端](https://git-scm.com/downloads) 并运行 Git Bash。

```bash
$ pwd
/c/Users/username
$ cd /d # 切换到合适的盘符
$ git clone https://github.com/MegEngine/MegFlow
...
$ cd MegFlow
$ docker build -t megflow .
... # 等待镜像完成,却决于网络和 CPU
```
> 注意:**不要移动 Dockerfile 文件的位置**。受 [EAR](https://www.federalregister.gov/documents/2019/10/09/2019-22210/addition-of-certain-entities-to-the-entity-list) 约束,MegFlow 无法提供现成的 docker 镜像,需要自己 build 出来,这个过程用了相对路径。

## 运行

```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
megflow latest c65e37e1df6c 18 hours ago 5.05GB
```
直接用 ${IMAGE ID} 进入开始跑应用,挂载上之前下载好的模型包
```bash
$ docker run -p 18081:8081 -p 18082:8082 -v ${DOWNLOAD_MODEL_PATH}:/megflow-runspace/flow-python/examples/models -i -t c65e37e1df6c /bin/bash
```

## Python Built-in Applications

MegFlow 需要的编译运行环境已完成,接下来开始运行好玩的 Python 应用

* [猫猫围栏运行手册](../../flow-python/examples/cat_finder/README.md)
* 图片注册猫猫
* 部署视频围栏,注册的猫离开围栏时会发通知
* 未注册的不会提示
* [电梯电瓶车告警](../../flow-python/examples/electric_bicycle/README.md)
* 电梯里看到电瓶车立即报警
* Comming Soon
* OCR: 通用字符识别
19 changes: 15 additions & 4 deletions docs/how-to-build-and-run/build-with-docker.zh.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
# Building with docker

## Build Docker Image

MegFlow 提供了 [Dockerfile](../../Dockerfile),能够“可复现地”生成运行环境、减少依赖缺失的痛苦

## 下载模型包
docker 运行方式,建议把模型包下好,
解压备用。


| 云盘 | google drive | dropbox |
| - | - | - |
| [链接](https://pan.baidu.com/s/1SoxHZjdWyPRIAwfcHWUQTQ) 提取码: ebcn | [google](https://drive.google.com/file/d/1EwMJFjNp2kuNglutoleZOVsqccSOW2Z4/view?usp=sharing) | [dropbox](https://www.dropbox.com/s/akhkxedyo2ubmys/models.zip?dl=0) |


## 编译 Docker 镜像


```bash
$ cd MegFlow
$ docker build -t megflow .
Expand All @@ -15,9 +26,9 @@ $ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
megflow latest c65e37e1df6c 18 hours ago 5.05GB
```
直接用 ${IMAGE ID} 进入开始跑应用
直接用 ${IMAGE ID} 进入开始跑应用,挂载上之前下载好的模型包
```bash
$ docker run -p 18081:8081 -p 18082:8082 -i -t c65e37e1df6c /bin/bash
$ docker run -p 18081:8081 -p 18082:8082 -v ${DOWNLOAD_MODEL_PATH}:/megflow-runspace/flow-python/examples/models -i -t c65e37e1df6c /bin/bash
```

## Python Built-in Applications
Expand Down