Create an environment for someone#
A workspace admin can make an environment that belongs to someone else: it is theirs from the start, as if they had made it. Use it to hand a new team member a ready machine, or to prepare one environment per student.
Before you begin#
- The admin role in the workspace (or admin of its organisation).
Anyone else is refused with
403 ADMIN_ONLY: only the workspace's admins make a runtime for someone else. - The person must be an editor or admin of the workspace (or an admin of its organisation): viewers reach no runtime.
- For the API tabs,
ASTRAEUS_TOKEN,CONSOLEandAPIas in Create and change a runtime.
Create it#
- Open Hesperus → Environments and press New environment.
- Fill it in as for your own (Create an environment).
- In Create for… (An admin makes it for someone else: it is theirs (their limits, their SSH and IDE)), choose the person instead of Me.
- Press Create and start. Its page shows them as Owner, made by you.
$ astra env create ana-dev --for [email protected] --preset pytorch --gpus 1 --machine gpu-01
ana-dev is [email protected]'s (made by you)
ana-dev is pending: `astra ssh ana-dev` connects once it is ready (and waits for it)
The e-mail is looked up among the workspace's members and the organisation's admins.
for names the owner as user:<id> (their user_id in
GET $CONSOLE/members):
$ curl -fsS -X POST "$API/notebook-runtimes" -H "Authorization: Bearer $ASTRAEUS_TOKEN" \
-H 'content-type: application/json' \
-d '{"metadata": {"name": "ana-dev"}, "for": "user:<their user id>",
"spec": {"kind": "shell", "image": "pytorch", "resources": {"gpus": {"count": 1}}, "placement": {"node": "gpu-01"}}}' \
| jq '{owner: .spec.started_by, made_by: .spec.created_by, reason: .status.reason}'
The runtime's spec.started_by is the owner and spec.created_by you;
its first state's reason says Started by <you> for <them>.
What it means#
- It is theirs. They SSH into it, open its IDE and its apps, and share
it;
astra ssh configon their computer writes its host. You can still connect as a workspace admin. - Their limits apply, not yours: an environment over their limit is refused, naming which of their runtimes to stop (Set limits per person).
- Its login and home are the environment's (
rootunless you set Log in as), on its own drive<name>-home.
Only an admin may also make one that never stops when idle (Idle stop
0, --idle 0): a shared login environment, as in
Members and limits.