curl --request GET \
--url https://www.chenyu.cn/api/open/v2/image/market/list \
--header 'Authorization: Bearer <token>'{
"code": 123,
"msg": "<string>",
"data": {
"image_list": [
{
"uuid": "<string>",
"components": {
"CUDA": "<string>",
"PaddlePaddle": "<string>",
"PyTorch": "<string>",
"Python": "<string>",
"TensorFlow": "<string>",
"Ubuntu": "<string>"
},
"size": 123,
"created_at": 123,
"updated_at": 123
}
],
"total": 123,
"page": 123,
"page_size": 123
}
}查询算力市场中可用的镜像列表
curl --request GET \
--url https://www.chenyu.cn/api/open/v2/image/market/list \
--header 'Authorization: Bearer <token>'{
"code": 123,
"msg": "<string>",
"data": {
"image_list": [
{
"uuid": "<string>",
"components": {
"CUDA": "<string>",
"PaddlePaddle": "<string>",
"PyTorch": "<string>",
"Python": "<string>",
"TensorFlow": "<string>",
"Ubuntu": "<string>"
},
"size": 123,
"created_at": 123,
"updated_at": 123
}
],
"total": 123,
"page": 123,
"page_size": 123
}
}Show data
import requests
url = "https://www.chenyu.cn/api/open/v2/image/market/list"
headers = {
"Authorization": "Bearer your_api_key",
"Content-Type": "application/json"
}
params = {
"page": 1,
"page_size": 20,
"cuda_version": "11.8",
"python_version": "3.9"
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
print("算力市场镜像列表:")
print(f"总数: {result['data']['total']}, 当前页: {result['data']['page']}")
for image in result['data']['image_list']:
print(f"UUID: {image['uuid']}")
print(f"CUDA版本: {image['components']['CUDA']}")
print(f"Python版本: {image['components']['Python']}")
print(f"PyTorch版本: {image['components']['PyTorch']}")
print(f"TensorFlow版本: {image['components']['TensorFlow']}")
print(f"镜像大小: {image['size']} 字节")
print("---")
{
"code": 0,
"msg": "查询成功",
"data": {
"image_list": [
{
"uuid": "ceb70da2df074c9e99905b6a4f4db032",
"components": {
"CUDA": "11.8.0",
"PaddlePaddle": "2.5.2",
"PyTorch": "2.1.2",
"Python": "3.10",
"TensorFlow": "2.16.2",
"Ubuntu": "22.04"
},
"size": 19372840210,
"created_at": 1743213028,
"updated_at": 1743215603
}
],
"total": 84,
"page": 1,
"page_size": 1
}
}