# MANTA主网矿机部署文档

### 一、    MANTA部署简介

MANTA是依托于matrix主链的分布式自动机器学习平台，这个平台是一个基于分布式技术加速的自动机器学习（AutoML）应用及其部署系统，通过AutoML网络搜索算法搜索一个高精度、低延迟的深度模型，并利用分布式计算技术进行搜索加速。

当前MANTA可以部署到matrix矿机上，也可以单独部署。服务部署好后通过公网IP地址加端口8502访问软件中训练的web服务。当MANTA开发商业运营时，MANTA服务平台会登记用户的公网IP和钱包地址，并分配一定的学习任务，然后根据完成的任务按照钱包地址进行奖励发放。

&#x20;

### 二、    矿机硬件配置要求

CPU：Intel Xeon 系列，2.0GHz 以上主频，核心数目 8 个以上&#x20;

GPU：Nvidia Pascal 或以上架构，显存不小于 12GB

网络：内网带宽大于 10Gbps，外网带宽大于 10Gbps

硬盘：至少 700G SSD 硬盘，500G用于存储Matrix主网数据，200G用以存储模型和训练日志

内存：32GB 以上

网络配置：服务器允许被公网访问，访问地址示例：http\://{IP}:8052，其中 IP 为部署服务器的对公可访问地址。

### 三、分布式自动机器学习 Web 服务配置&#x20;

1\. 训练数据集准备

该项目主要会用到两个数据集，分别用于图像分类和双目视差估计模型的训练。

•   图像分类：ImageNet

网络连接（<https://www.image-net.org/challenges/LSVRC/2012/）>

（参考链接：<https://blog.csdn.net/Yuan\\_mingyu/article/details/123940228）>

（1）        数据集下载&#x20;

数据集官网：<https://www.image-net.org/challenges/LSVRC/index.php>

<figure><img src="/files/oGG6QNgNvmiLmz7St1iQ" alt=""><figcaption></figcaption></figure>

如果是图像识别任务的话，下载这两个就可以了。&#x20;

Training images (Task 1 & 2)&#x20;

（<https://image-net.org/data/ILSVRC/2012/ILSVRC2012\\_img\\_train.tar）>

Validation images (all tasks)&#x20;

（<https://image-net.org/data/ILSVRC/2012/ILSVRC2012\\_img\\_val.tar）>

&#x20;

（2）        数据集处理

已经下载了两个数据集，一个是训练集，一个是验证集，现在就要把这数据集整理成可以供模型直接加载的形式。

首先解压 ILSVRC2012\_img\_train.tar 到 train，里边包含 1000 个小的 tar 压缩包，每一个对应一类的图片（压缩包的名称就代表这一类，不要修改），所以再将他们都解压成文件夹就好了。

&#x20;

先解压&#x20;

“&#x20;

mkdir train tar xvf ILSVRC2012\_img\_train.tar -C ./train&#x20;

“ 因为数量多，写个脚本 unzip.sh 如下&#x20;

<figure><img src="/files/dHWxzn3baCcrDqUO6vqL" alt=""><figcaption></figcaption></figure>

添加可执行权限，执行一下&#x20;

“&#x20;

chmod +x ./unzip.sh&#x20;

./unzip.sh&#x20;

“&#x20;

由于压缩包 ILSVRC2012\_img\_train.tar 比较大，处理后可以删除了。可以直接把 train.tar 先移动到 train 中，再进行操作。&#x20;

&#x20;

最终训练集形式：&#x20;

<figure><img src="/files/Kte8Zix6tzWvEoPEkm7f" alt=""><figcaption></figcaption></figure>

&#x20;

验证集比较简单，只有 50000 张图片，直接解压 ILSVRC2012\_img\_val.tar 就可以。但是为了后续的使用，也需要把这些图片分成 1000 类（创建 1000 个文件夹，把对应类的图片放进去，与训练集结构保持一致）。

&#x20;

先解压&#x20;

“&#x20;

mkdir val tar xvf ILSVRC2012\_img\_val.tar -C ./val&#x20;

”&#x20;

进入 val，下载脚本，执行

“&#x20;

cd val&#x20;

wget     -qO-&#x20;

<https://raw.githubusercontent.com/soumith/imagenetloader.torch/master/valprep.sh> chmod +x ./valprep.sh&#x20;

./valprep.sh rm valprep.sh&#x20;

“&#x20;

最终验证集形式：&#x20;

<figure><img src="/files/YclCi0gtlI9C05p74Mo2" alt=""><figcaption></figcaption></figure>

数据集处理后格式：&#x20;

![](/files/3mzLOUjisTNAPLgCD2rR)

•   双目视差估计：SceneFlow&#x20;

网络链接：(<https://lmb.informatik.uni-freiburg.de/resources/datasets/SceneFlowDatasets.en.html>)

下载页面中这六个数据集并解压：&#x20;

<figure><img src="/files/XKwynrGYq2Uhklc6yIqr" alt=""><figcaption></figcaption></figure>

&#x20;

下载完数据后，分别按照以下方式修改路径，以便于被 Web 服务识别到&#x20;

（1）     ImageNet&#x20;

/mnt/imagenet&#x20;

\|&#x20;

\|--train&#x20;

\|--val&#x20;

&#x20;

（2）     SceneFlow&#x20;

/mnt/SceneFlow&#x20;

\|&#x20;

\|--FlyingThings3D&#x20;

\|--Monkaa&#x20;

\|--Driving&#x20;

&#x20;

2\. 训练 Web 服务启动&#x20;

Ø  下载dist-automl，下载链接如下：

<https://www.matrix.io/assets/dropdown/dist-automl1.1.zip>

Ø  解压dist-automl

命令：Unzip -d dist-automl

Ø  进入 dist-automl 目录&#x20;

命令：cd dist-automl&#x20;

Ø  安装项目依赖的 python 库&#x20;

命令：pip install -r requirements.txt&#x20;

Ø  运行服务启动命令

命令：streamlit run training\_manager.py 终端显示如下内容：

<figure><img src="/files/KAO6yoV9ZC3TWs6iKPo4" alt=""><figcaption></figcaption></figure>

表明服务已经运行成功，将图中红框部分替换成部署服务器的公网 IP，即可通过该地址访问到该软件中的训练 Web 服务。

同时可以将部署好的服务提供到主网络分布式自动机器学习服务。&#x20;

<figure><img src="/files/5vlQwbdr3fiLs3YTbUbL" alt=""><figcaption></figcaption></figure>

&#x20;&#x20;

&#x20;

&#x20;

## MANTA加入MAN钱包的说明

下载最新版dist\_automl1.1.zip，

下载链接：<https://www.matrix.io/assets/dropdown/dist-automl1.1.zip>

一、    生成自己MANTA钱包

通过官网钱包生成钱包，自己妥协保存私钥或者keystore+密码或者足记词。

二、      MANTA服务器运行加密钱包程序

![](/files/xUC4D2j4ofvpqDnU8cjQ)

(1)将钱包地址复制到输入框，点击加密

(2)记录生成的密码和密文，并通过邮件密码和密文发送到\*\*@matrix.io邮箱

&#x20;

三、      将密文复制到项目目录的Wallet\_info.md中

<figure><img src="/files/ep1sCyWbQ1qJUNqa7c2M" alt=""><figcaption></figcaption></figure>

四、启动web\_service查看钱包

启动服务：streamlit run web\_service.py

输入密码，查看钱包信息

<figure><img src="/files/MNbQeI3tQWX7TbSCnJu7" alt=""><figcaption></figcaption></figure>

&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.matrix.io/manta/manta-zhu-wang-kuang-ji-bu-shu-wen-dang.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
