通过 bohr CLI 或 open.bohrium.com API 管理 Bohrium 项目。使用时机:用户询问在 Bohrium 上创建/列出/删除项目、管理项目成员...
Manage projects on the Bohrium platform. Prefer bohr CLI; fall back to the API only for operations the CLI doesn't support (member management, cost limits, renaming).
Projects are the organizational containers for Nodes, Jobs, Images, and Datasets — and the basic unit for team collaboration and cost management.
json
"bohrium-project": {
"enabled": true,
"apiKey": "YOUR_ACCESS_KEY",
"env": {
"ACCESS_KEY": "YOUR_ACCESS_KEY"
}
}
bash
# macOS
/bin/bash -c "$(curl -fsSL https://dp-public.oss-cn-beijing.aliyuncs.com/bohrctl/1.0.0/install_bohr_mac_curl.sh)"
# Linux
/bin/bash -c "$(curl -fsSL https://dp-public.oss-cn-beijing.aliyuncs.com/bohrctl/1.0.0/install_bohr_linux_curl.sh)"
source ~/.bashrc # or source ~/.zshrc
export PATH="$HOME/.bohrium:$PATH"
bash
bohr project list # Table format
bohr project list --json # JSON format
bohr project list --csv # CSV format
JSON fields:
FieldDescriptionprojectIdProject IDnameProject name
bash
bohr project create -n "my-experiment"
bohr project create -n "my-experiment" -m 5000 # Monthly cost limit
bohr project create -n "my-experiment" -t 10000 # Total cost limit
Parameters:
ParameterShortRequiredDescription--name``-nYesProject name (default "default")--month_cost_limit``-mNoMonthly cost limit--total_cost_limit``-tNoTotal cost limit
bash
bohr project delete 154
Warning: Deleting a project is irreversible — all jobs and images under the project will be removed and cannot be recovered.
Bohrium projects have 3 roles:
RoleDescriptionCreatorThe user who created the project; exactly one per project, non-transferableAdminAppointed by the creator; can have multiple; can be revoked at any timeMemberUsers added to the project; default role
ModulePermissionCreatorAdminMemberProjectRename project✓✓✗ProjectDelete project✓✗✗MembersAdd/remove members✓✓✗MembersPromote/demote admins✓✗✗BudgetView/adjust project & member budgets✓✓✗NodesView/manage all project nodes✓✓✗JobsView/manage all project jobs✓✓✗ImagesView/manage all project images✓✓✗BillingView/download billing reports✓✓✗
Important: Costs incurred by members are charged directly to the project creator's wallet balance.
Creators and admins can set the project's total budget (optional). If not set, the default is "unlimited".
When the project's total cost exceeds the budget, members cannot submit new jobs or start new nodes.
Individual spending limits can be assigned per member:
Set project cost limit via API:
python
requests.post(f"{BASE}/set_cost_limit", headers=HEADERS_JSON,
json={"projectId": 154, "costLimit": 5000})
Each project has 1TB of free shared storage with read/write access for all members.
/share directory via Web Shell or the file management pageAll project members can see custom images created by other members in the Bohrium Image Center, making it easy to share development environments.
ItemDescriptionCompute resourcesBilled by duration of resource usage; prices vary by configurationDev nodesBilled continuously while running; stop or delete when not in usePersonal storage (/personal)500GB free; additional capacity requires purchaseProject storage (/share)1TB free; additional capacity requires purchase
ResourceLimitProjects4 per user (only self-created; joined projects don't count)Nodes4 per user per projectConcurrent running jobs100 per userCustom images10 per projectProject shared disk1TB per projectPersonal data disk500GB per user per project
Contact Bohrium support to increase quotas.
The following operations are not covered by the bohr CLI and require the API:
python
import os, requests
AK = os.environ.get("ACCESS_KEY", "")
BASE = "https://open.bohrium.com/openapi/v1/project"
HEADERS = {"accessKey": AK}
HEADERS_JSON = {**HEADERS, "Content-Type": "application/json"}
# Detailed project list (with cost, member count, etc.)
r = requests.get(f"{BASE}/list", headers=HEADERS)
# Returns: {items: [{id, name, totalCost, monthCost, userCount, projectRole, ...}]}
# Lightweight project list (id + name only)
r = requests.get(f"{BASE}/lite_list", headers=HEADERS)
# Rename project
requests.post(f"{BASE}/set_name", headers=HEADERS_JSON,
json={"projectId": 154, "name": "new-name"})
# Set cost limit
requests.post(f"{BASE}/set_cost_limit", headers=HEADERS_JSON,
json={"projectId": 154, "costLimit": 5000})
# View project members
r = requests.get(f"{BASE}/154/users", headers=HEADERS)
# Returns: {items: [{userId, userName, email, projectRole, cost, ...}]}
# Add member (by email)
requests.post(f"{BASE}/add_user", headers=HEADERS_JSON,
json={"projectId": 154, "email": "user@example.com"})
# Remove member
requests.post(f"{BASE}/del_user", headers=HEADERS_JSON,
json={"projectId": 154, "userId": 12345})
# Promote/demote admin
requests.post(f"{BASE}/manager/add", headers=HEADERS_JSON,
json={"projectId": 154, "userId": 12345})
requests.post(f"{BASE}/manager/del", headers=HEADERS_JSON,
json={"projectId": 154, "userId": 12345})
# Recover deleted member
requests.put(f"{BASE}/154/recovery_user", headers=HEADERS_JSON,
json={"userId": 12345})
projectRoleMeaning1Creator / Admin3Regular member
The following endpoints are not accessible via openapi accessKey (return 404):
EndpointReasonPOST /project/joinRoute forwarding path mismatchPOST /project/share_statusSameGET /project/availableRegistered in AK v2 Group; unreachable via v1 accessKey
ProblemCauseSolutionCan't find newly created projectNew project is at end of listbohr project list --json to see allFailed to remove memberWrong userIdGet userId via API /{id}/users firstAdding member has no effectEmail doesn't existEnsure target user is registered on BohriumProject count limit reachedMax 4 self-created projects per userDelete unused projects or contact supportMember can't submit jobsProject or member budget exceededCreator/admin adjusts budgetInsufficient balanceAccount balance is zeroTop up to resume usage