README_zh_CN.md 1.51 KB
Newer Older
Chi Song's avatar
Chi Song committed
1
2
3
4
# 用于 NNI 的 python 包索引 (pypi)

这是用于 NNI 项目的 PyPI 生成和上传的工具。

Chi Song's avatar
Chi Song committed
5
## **Linux**
Chi Song's avatar
Chi Song committed
6

Chi Song's avatar
Chi Song committed
7
* **准备环境**
Chi Song's avatar
Chi Song committed
8
    
Chi Song's avatar
Chi Song committed
9
10
11
12
13
14
15
16
17
18
    在生成和上传 NNI 包之前,确保使用了下列环境。
    
        Ubuntu 16.04 LTS
        make
        wget
        Python >= 3.5
        Pip
        Node.js
        Yarn
        
Chi Song's avatar
Chi Song committed
19

Chi Song's avatar
Chi Song committed
20
21
22
23
24
* **如何生成**
    
    ```bash
    make
    ```
Chi Song's avatar
Chi Song committed
25

Chi Song's avatar
Chi Song committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
* **如何上传**
    
    **上传测试包**
    
    ```bash
    TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/ make upload
    ```
    
    上传过程中,可能需要输入 https://test.pypi.org 的用户和密码。
    
    **上传发布包**
    
    ```bash
    make upload
    ```
    
    上传过程中,可能需要输入 https://pypi.org 的用户和密码。
Chi Song's avatar
Chi Song committed
43

Chi Song's avatar
Chi Song committed
44
## **Windows**
Chi Song's avatar
Chi Song committed
45

Chi Song's avatar
Chi Song committed
46
47
48
49
50
51
52
53
54
55
* **准备环境**
    
    在生成和上传 NNI 包之前,确保使用了下列环境。
    
        Windows 10
        powershell
        Python >= 3.5
        Pip
        Yarn
        
Chi Song's avatar
Chi Song committed
56

Chi Song's avatar
Chi Song committed
57
58
* **如何生成**
    
Chi Song's avatar
Chi Song committed
59
60
    参数 `version_os` 用来选择使用 64 位还是 32 位 Windows 来生成。
    
Chi Song's avatar
Chi Song committed
61
    ```bash
Chi Song's avatar
Chi Song committed
62
    powershell ./install.ps1 -version_os [64/32]
Chi Song's avatar
Chi Song committed
63
    ```
Chi Song's avatar
Chi Song committed
64

Chi Song's avatar
Chi Song committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
* **如何上传**
    
    **upload for testing**
    
    ```bash
    powershell ./upload.ps1
    ```
    
    上传过程中,可能需要输入 https://test.pypi.org 的用户和密码。
    
    **上传发布包**
    
    ```bash
    powershell ./upload.ps1 -test $False
    ```
    
    上传过程中,可能需要输入 https://pypi.org 的用户和密码。