bitahub 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bitahub-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 HuZhangchi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
bitahub-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: bitahub
3
+ Version: 0.1.0
4
+ Summary: BitaHub 平台命令行工具,用于登录、管理项目和任务、查询 GPU 资源
5
+ Home-page: https://github.com/RicePasteM/BitaHub-CLI
6
+ Author: HuZhangchi
7
+ License-Expression: MIT
8
+ Project-URL: Homepage, https://github.com/RicePasteM/BitaHub-CLI
9
+ Project-URL: Repository, https://github.com/RicePasteM/BitaHub-CLI.git
10
+ Project-URL: Issues, https://github.com/RicePasteM/BitaHub-CLI/issues
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Utilities
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: requests>=2.28.0
28
+ Requires-Dist: click>=8.0.0
29
+ Dynamic: home-page
30
+ Dynamic: license-file
31
+ Dynamic: requires-python
32
+
33
+ # BitaHub-CLI
34
+
35
+ BitaHub 平台命令行工具,用于登录、管理项目和任务、查询 GPU 资源。
36
+
37
+ ## 安装
38
+
39
+ ```bash
40
+ pip install -e .
41
+ ```
42
+
43
+ ## 依赖
44
+
45
+ - Python >= 3.8
46
+ - requests >= 2.28.0
47
+ - click >= 8.0.0
48
+
49
+ ## 使用方法
50
+
51
+ ### 账户
52
+
53
+ ```bash
54
+ bitahub login <邮箱> <密码> # 登录
55
+ bitahub status # 查看登录状态(含当前项目)
56
+ bitahub logout # 退出登录
57
+ ```
58
+
59
+ ### 项目管理
60
+
61
+ ```bash
62
+ bitahub list-project # 查看项目列表
63
+ bitahub list-project -p 2 -s 10 # 分页查看
64
+ bitahub use <项目ID/项目名称> # 切换到指定项目
65
+ ```
66
+
67
+ ### 任务管理
68
+
69
+ ```bash
70
+ bitahub list-task # 查看任务列表(含标签)
71
+ bitahub list-task -p 2 -s 10 # 分页查看
72
+ bitahub status -t <ID或codeNo> # 查看任务详情(参数/日志/SSH)
73
+ bitahub tail -t <ID> -l 100 # 查看日志末尾
74
+ bitahub full-log -t <ID> # 查看完整日志
75
+
76
+ # 启动任务
77
+ bitahub run -i <镜像> -g rtx3090 -c 1 -x "python train.py"
78
+ bitahub run -i <镜像> -g rtx3090 -c 1 -x "python train.py" --tag mytag
79
+
80
+ # 创建调试机并获取 SSH 连接
81
+ bitahub create-debug -i <镜像> -c 1
82
+ bitahub create-debug -i <镜像> -c 1 -x "sleep 3h"
83
+
84
+ # 停止任务
85
+ bitahub stop-task -t <ID或codeNo>
86
+ bitahub stop-task -t <ID或codeNo> -f # 跳过确认
87
+
88
+ # 删除任务
89
+ bitahub delete-task -t <ID或codeNo>
90
+ bitahub delete-task -t <ID或codeNo> -f # 跳过确认
91
+ ```
92
+
93
+ ### 资源与镜像
94
+
95
+ ```bash
96
+ bitahub list-gpu # 查看 GPU 资源
97
+ bitahub list-gpu -g rtx3090 # 按类型筛选
98
+ bitahub list-image # 查看平台镜像(缓存)
99
+ bitahub list-image --update # 刷新缓存
100
+ bitahub list-image --user # 用户自定义镜像
101
+ ```
102
+
103
+ ### 支付
104
+
105
+ ```bash
106
+ bitahub payment # 查看算力余额
107
+ bitahub payment -s <团队ID> # 设置默认支付
108
+ ```
109
+
110
+ ## 配置
111
+
112
+ 配置存储在 `~/.bitahub/config.json`,镜像缓存存储在 `~/.bitahub/images_cache.json`。
113
+
114
+ ## License
115
+
116
+ MIT
@@ -0,0 +1,84 @@
1
+ # BitaHub-CLI
2
+
3
+ BitaHub 平台命令行工具,用于登录、管理项目和任务、查询 GPU 资源。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ pip install -e .
9
+ ```
10
+
11
+ ## 依赖
12
+
13
+ - Python >= 3.8
14
+ - requests >= 2.28.0
15
+ - click >= 8.0.0
16
+
17
+ ## 使用方法
18
+
19
+ ### 账户
20
+
21
+ ```bash
22
+ bitahub login <邮箱> <密码> # 登录
23
+ bitahub status # 查看登录状态(含当前项目)
24
+ bitahub logout # 退出登录
25
+ ```
26
+
27
+ ### 项目管理
28
+
29
+ ```bash
30
+ bitahub list-project # 查看项目列表
31
+ bitahub list-project -p 2 -s 10 # 分页查看
32
+ bitahub use <项目ID/项目名称> # 切换到指定项目
33
+ ```
34
+
35
+ ### 任务管理
36
+
37
+ ```bash
38
+ bitahub list-task # 查看任务列表(含标签)
39
+ bitahub list-task -p 2 -s 10 # 分页查看
40
+ bitahub status -t <ID或codeNo> # 查看任务详情(参数/日志/SSH)
41
+ bitahub tail -t <ID> -l 100 # 查看日志末尾
42
+ bitahub full-log -t <ID> # 查看完整日志
43
+
44
+ # 启动任务
45
+ bitahub run -i <镜像> -g rtx3090 -c 1 -x "python train.py"
46
+ bitahub run -i <镜像> -g rtx3090 -c 1 -x "python train.py" --tag mytag
47
+
48
+ # 创建调试机并获取 SSH 连接
49
+ bitahub create-debug -i <镜像> -c 1
50
+ bitahub create-debug -i <镜像> -c 1 -x "sleep 3h"
51
+
52
+ # 停止任务
53
+ bitahub stop-task -t <ID或codeNo>
54
+ bitahub stop-task -t <ID或codeNo> -f # 跳过确认
55
+
56
+ # 删除任务
57
+ bitahub delete-task -t <ID或codeNo>
58
+ bitahub delete-task -t <ID或codeNo> -f # 跳过确认
59
+ ```
60
+
61
+ ### 资源与镜像
62
+
63
+ ```bash
64
+ bitahub list-gpu # 查看 GPU 资源
65
+ bitahub list-gpu -g rtx3090 # 按类型筛选
66
+ bitahub list-image # 查看平台镜像(缓存)
67
+ bitahub list-image --update # 刷新缓存
68
+ bitahub list-image --user # 用户自定义镜像
69
+ ```
70
+
71
+ ### 支付
72
+
73
+ ```bash
74
+ bitahub payment # 查看算力余额
75
+ bitahub payment -s <团队ID> # 设置默认支付
76
+ ```
77
+
78
+ ## 配置
79
+
80
+ 配置存储在 `~/.bitahub/config.json`,镜像缓存存储在 `~/.bitahub/images_cache.json`。
81
+
82
+ ## License
83
+
84
+ MIT
@@ -0,0 +1,3 @@
1
+ """BitaHub CLI tool for interacting with bitahub.ustc.edu.cn platform."""
2
+
3
+ __version__ = "0.1.0"