## 阿里云函数计算Funcraft使用
#### Funcraft安装
1. Funcraft需要配合Docker使用,确保已经安装好docker
2. 使用官方二进制包 [https://github.com/alibaba/funcraft/releases](https://github.com/alibaba/funcraft/releases)
3. 解压并配置环境变量即可
#### 准备
- fun config
#### 函数初始化
- fun init
- [](https://static.adong.wiki/static/images/md/2020060601.png)
- 选择 python3
- 创建 Funfile 配置相关python库
Funfile文件
``` Dockerfile
RUNTIME python3
RUN fun-install pip install pymysql
RUN fun-install pip install pandas
RUN fun-install pip install scipy
RUN fun-install pip install python-dateutil
RUN fun-install pip install sqlalchemy
```
- fun install 安装 Funfile所配置的库
- [](https://static.adong.wiki/static/images/md/2020060602.png)
#### 运行
- fun local invoke fun
- [](https://static.adong.wiki/static/images/md/2020060603.png)