For users who want to try SecretFlow, you can install the current release from pypi. Note that it requires python version == 3.8, you can create a virtual environment with conda if not satisfied.
Python:3.8
OS: CentOS 7, Ubuntu 18.04
CPU/Memory: recommended minimum requirement is 8C16G.
The latest release package can be obtained from pypi.
pip安装,作者使用的OS环境进行安装。
pip install -U secretflow
pip install time out,可以切换多国内镜像进行安装。
pip3 config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
After installation, you can try running your secretflow code.
- #!/usr/bin/env python
- import secretflow as sf
- sf.init(['alice', 'bob', 'carol'], num_cpus=8, log_to_driver=True)
- dev = sf.PYU('alice')
- import numpy as np
- data = dev(np.random.rand)(3, 4)
- print(data)
- lilili:Desktop liyapeng$ python3 test_secretflow.py
- <secretflow.device.device.pyu.PYUObject object at 0x7feea09dad00>