cloudos-cli 2.82.1__tar.gz → 2.84.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.
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/PKG-INFO +366 -2
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/README.md +365 -1
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/__init__.py +1 -1
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/__main__.py +2 -0
- cloudos_cli-2.84.0/cloudos_cli/_version.py +1 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/clos.py +167 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/configure/configure.py +4 -6
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/datasets/cli.py +0 -2
- cloudos_cli-2.84.0/cloudos_cli/interactive_session/__init__.py +1 -0
- cloudos_cli-2.84.0/cloudos_cli/interactive_session/cli.py +862 -0
- cloudos_cli-2.84.0/cloudos_cli/interactive_session/interactive_session.py +1876 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/PKG-INFO +366 -2
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/SOURCES.txt +6 -0
- cloudos_cli-2.84.0/tests/test_interactive_session/__init__.py +1 -0
- cloudos_cli-2.84.0/tests/test_interactive_session/test_create_session.py +482 -0
- cloudos_cli-2.84.0/tests/test_interactive_session/test_list_sessions.py +250 -0
- cloudos_cli-2.82.1/cloudos_cli/_version.py +0 -1
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/LICENSE +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/bash/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/bash/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/configure/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/configure/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/constants.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/cost/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/cost/cost.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/cromwell/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/cromwell/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/datasets/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/datasets/datasets.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/import_wf/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/import_wf/import_wf.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/jobs/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/jobs/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/jobs/job.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/link/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/link/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/link/link.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/logging/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/logging/logger.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/procurement/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/procurement/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/procurement/images.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/projects/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/projects/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/queue/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/queue/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/queue/queue.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/related_analyses/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/array_job.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/cli_helpers.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/cloud.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/details.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/errors.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/last_wf.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/requests.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/utils/resources.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/workflows/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli/workflows/cli.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/requires.txt +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/cloudos_cli.egg-info/top_level.txt +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/setup.cfg +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/setup.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/functions_for_pytest.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_cli_project_create.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_cost/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_cost/test_job_cost.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_error_messages.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_logging/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_logging/test_logger.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_related_analyses/__init__.py +0 -0
- {cloudos_cli-2.82.1 → cloudos_cli-2.84.0}/tests/test_related_analyses/test_related_analyses.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudos_cli
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.84.0
|
|
4
4
|
Summary: Python package for interacting with CloudOS
|
|
5
5
|
Home-page: https://github.com/lifebit-ai/cloudos-cli
|
|
6
6
|
Author: David Piñeyro
|
|
@@ -98,6 +98,10 @@ Python package for interacting with CloudOS
|
|
|
98
98
|
- [Custom Script Path](#custom-script-path)
|
|
99
99
|
- [Custom Script Project](#custom-script-project)
|
|
100
100
|
- [Use multiple projects for files in `--parameter` option](#use-multiple-projects-for-files-in---parameter-option)
|
|
101
|
+
- [Interactive Sessions](#interactive-sessions)
|
|
102
|
+
- [List Interactive Sessions](#list-interactive-sessions)
|
|
103
|
+
- [Get Interactive Session Status](#get-interactive-session-status)
|
|
104
|
+
- [Create Interactive Session](#create-interactive-session)
|
|
101
105
|
- [Datasets](#datasets)
|
|
102
106
|
- [List Files](#list-files)
|
|
103
107
|
- [Move Files](#move-files)
|
|
@@ -311,7 +315,14 @@ To generate a named profile, use the following command:
|
|
|
311
315
|
cloudos configure --profile {profile-name}
|
|
312
316
|
```
|
|
313
317
|
|
|
314
|
-
The same prompts will appear. If a profile with the same name already exists, the current parameters will appear in square brackets and can be overwritten or left unchanged by pressing Enter/Return.
|
|
318
|
+
The same prompts will appear, including the execution platform (aws or azure). If a profile with the same name already exists, the current parameters will appear in square brackets and can be overwritten or left unchanged by pressing Enter/Return.
|
|
319
|
+
|
|
320
|
+
When configuring a profile, you can specify:
|
|
321
|
+
- **API Key**: Your CloudOS API credentials
|
|
322
|
+
- **CloudOS URL**: The CloudOS instance URL
|
|
323
|
+
- **Project Name**: Default project for commands
|
|
324
|
+
- **Execution Platform**: `aws` (default) or `azure` - determines default instance types and available features
|
|
325
|
+
- **Repository Platform**: Version control system (github, gitlab, etc.)
|
|
315
326
|
|
|
316
327
|
> [!NOTE]
|
|
317
328
|
> When there is already at least 1 previous profile defined, a new question will appear asking to make the current profile as default
|
|
@@ -1967,6 +1978,359 @@ will take all `csv` file extensions in the specified folder.
|
|
|
1967
1978
|
|
|
1968
1979
|
---
|
|
1969
1980
|
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
### Interactive Sessions
|
|
1984
|
+
|
|
1985
|
+
Interactive sessions allow you to work within the platform using different virtual environments (Jupyter Notebooks, RStudio, VS Code, etc.). You can list, monitor, and manage your interactive sessions using the CLI.
|
|
1986
|
+
|
|
1987
|
+
#### List Interactive Sessions
|
|
1988
|
+
|
|
1989
|
+
You can get a list of all interactive sessions in your workspace by running `cloudos interactive-session list`. The command can produce three different output formats that can be selected using the `--output-format` option:
|
|
1990
|
+
|
|
1991
|
+
- **stdout** (default): Displays a table directly in the terminal with interactive pagination
|
|
1992
|
+
- **csv**: Saves session data to a CSV file with a minimum predefined set of columns by default, or all available columns using the `--all-fields` parameter
|
|
1993
|
+
- **json**: Saves complete session information to a JSON file with all available fields
|
|
1994
|
+
|
|
1995
|
+
To display the list of interactive sessions as a formatted table in the terminal:
|
|
1996
|
+
|
|
1997
|
+
```bash
|
|
1998
|
+
cloudos interactive-session list --profile my_profile
|
|
1999
|
+
# or explicitly:
|
|
2000
|
+
cloudos interactive-session list --profile my_profile --output-format stdout
|
|
2001
|
+
```
|
|
2002
|
+
|
|
2003
|
+
The table displays sessions with pagination controls (press `n` for next page, `p` for previous page, or `q` to quit):
|
|
2004
|
+
|
|
2005
|
+
```console
|
|
2006
|
+
Interactive Sessions
|
|
2007
|
+
┏━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┓
|
|
2008
|
+
┃ Status ┃ Name ┃ Type ┃ ID ┃ Owner ┃
|
|
2009
|
+
┡━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━┩
|
|
2010
|
+
│ stopped │ cloudosR │ awsRstudio │ 69aee0dba197… │ Leila │
|
|
2011
|
+
│ running │ analysis-dev │ awsJupyterNotebook │ 69ae972a18f0… │ John │
|
|
2012
|
+
│ stopped │ test_session │ awsVSCode │ 69a996c098ab… │ James │
|
|
2013
|
+
└─────────┴──────────────┴────────────────────┴───────────────┴────────┘
|
|
2014
|
+
|
|
2015
|
+
Total sessions: 15
|
|
2016
|
+
Page: 1 of 3
|
|
2017
|
+
Sessions on this page: 5
|
|
2018
|
+
|
|
2019
|
+
n = next, p = prev, q = quit
|
|
2020
|
+
```
|
|
2021
|
+
|
|
2022
|
+
To save sessions to a CSV file with all available fields:
|
|
2023
|
+
|
|
2024
|
+
```bash
|
|
2025
|
+
cloudos interactive-session list --profile my_profile --output-format csv --all-fields
|
|
2026
|
+
```
|
|
2027
|
+
|
|
2028
|
+
The expected output is something similar to:
|
|
2029
|
+
|
|
2030
|
+
```console
|
|
2031
|
+
Interactive session list saved to interactive_sessions_list.csv
|
|
2032
|
+
```
|
|
2033
|
+
|
|
2034
|
+
To save the same information in JSON format:
|
|
2035
|
+
|
|
2036
|
+
```bash
|
|
2037
|
+
cloudos interactive-session list --profile my_profile --output-format json
|
|
2038
|
+
```
|
|
2039
|
+
|
|
2040
|
+
```console
|
|
2041
|
+
Interactive session list collected with a total of 15 sessions.
|
|
2042
|
+
Interactive session list saved to interactive_sessions_list.json
|
|
2043
|
+
```
|
|
2044
|
+
|
|
2045
|
+
**Filtering Options**
|
|
2046
|
+
|
|
2047
|
+
You can filter sessions by status and other criteria:
|
|
2048
|
+
|
|
2049
|
+
```bash
|
|
2050
|
+
# Filter by status (setup, initialising, running, scheduled, stopped)
|
|
2051
|
+
cloudos interactive-session list --profile my_profile --filter-status running
|
|
2052
|
+
|
|
2053
|
+
# Show only your own sessions
|
|
2054
|
+
cloudos interactive-session list --profile my_profile --filter-only-mine
|
|
2055
|
+
|
|
2056
|
+
# Include archived sessions
|
|
2057
|
+
cloudos interactive-session list --profile my_profile --archived
|
|
2058
|
+
|
|
2059
|
+
# Custom pagination
|
|
2060
|
+
cloudos interactive-session list --profile my_profile --limit 20 --page 2
|
|
2061
|
+
```
|
|
2062
|
+
|
|
2063
|
+
**Table Columns**
|
|
2064
|
+
|
|
2065
|
+
You can customize which columns to display:
|
|
2066
|
+
|
|
2067
|
+
```bash
|
|
2068
|
+
# Display specific columns
|
|
2069
|
+
cloudos interactive-session list --profile my_profile --table-columns "status,name,owner,project,created_at,cost"
|
|
2070
|
+
```
|
|
2071
|
+
|
|
2072
|
+
Available columns: `backend`, `cost`, `cost_limit`, `created_at`, `id`, `instance`, `name`, `owner`, `project`, `resources`, `runtime`, `saved_at`, `spot`, `status`, `time_left`, `type`, `version`
|
|
2073
|
+
|
|
2074
|
+
#### Get Interactive Session Status
|
|
2075
|
+
|
|
2076
|
+
You can retrieve detailed status information for a specific interactive session using the `cloudos interactive-session status` command. This command provides comprehensive information about the session including its current state, resource allocation, costs, and more.
|
|
2077
|
+
|
|
2078
|
+
**Basic Usage**
|
|
2079
|
+
|
|
2080
|
+
Get the status of a session:
|
|
2081
|
+
|
|
2082
|
+
```bash
|
|
2083
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile
|
|
2084
|
+
```
|
|
2085
|
+
|
|
2086
|
+
The command displays session information in a formatted table:
|
|
2087
|
+
|
|
2088
|
+
```console
|
|
2089
|
+
╔════════════════════╦═════════════════════════════════════════════════════╗
|
|
2090
|
+
║ Property ║ Value ║
|
|
2091
|
+
╠════════════════════╬═════════════════════════════════════════════════════╣
|
|
2092
|
+
║ Session ID ║ 69bc00cb1488084e5a6cae70 ║
|
|
2093
|
+
║ Name ║ analysis-dev (linked) ║
|
|
2094
|
+
║ Status ║ running ║
|
|
2095
|
+
║ Backend ║ awsJupyterNotebook ║
|
|
2096
|
+
║ Owner ║ John Doe ║
|
|
2097
|
+
║ Project ║ research ║
|
|
2098
|
+
║ Instance Type ║ c5.xlarge ║
|
|
2099
|
+
║ Storage ║ 50 GB ║
|
|
2100
|
+
║ Cost ║ $2.45/hour ║
|
|
2101
|
+
║ Runtime ║ 2h 15m 30s ║
|
|
2102
|
+
║ Created At ║ 2024-03-19 10:30:00 UTC ║
|
|
2103
|
+
║ Last Saved ║ 2024-03-19 12:30:00 UTC ║
|
|
2104
|
+
║ Auto-Shutdown At ║ 2024-03-19 18:30:00 UTC ║
|
|
2105
|
+
╚════════════════════╩═════════════════════════════════════════════════════╝
|
|
2106
|
+
```
|
|
2107
|
+
|
|
2108
|
+
**Watch Mode for Provisioning Sessions**
|
|
2109
|
+
|
|
2110
|
+
Use the `--watch` flag to continuously monitor a session's status as it provisions, with real-time status change notifications:
|
|
2111
|
+
|
|
2112
|
+
```bash
|
|
2113
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch
|
|
2114
|
+
```
|
|
2115
|
+
|
|
2116
|
+
Watch mode automatically tracks status changes and polls until the session reaches a terminal state:
|
|
2117
|
+
|
|
2118
|
+
```console
|
|
2119
|
+
Session 69bc00cb1488084e5a6cae70 currently is in initialising...
|
|
2120
|
+
Status changed: initialising → provisioning
|
|
2121
|
+
Status changed: provisioning → running
|
|
2122
|
+
✓ Session is now running and ready to use!
|
|
2123
|
+
```
|
|
2124
|
+
|
|
2125
|
+
**Watch Mode Behavior**
|
|
2126
|
+
|
|
2127
|
+
- **Pre-running sessions** (setup, initialising, scheduled): Watch mode will continuously poll and display status changes every 30 seconds (default)
|
|
2128
|
+
- **Running/stopped sessions**: Watch mode will show a warning and display the current status instead
|
|
2129
|
+
|
|
2130
|
+
Example with a running session:
|
|
2131
|
+
|
|
2132
|
+
```bash
|
|
2133
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch
|
|
2134
|
+
```
|
|
2135
|
+
|
|
2136
|
+
```console
|
|
2137
|
+
⚠ Warning: Watch mode only works for pre-running statuses (setup, initialising, scheduled). Current status: running. Showing session status instead.
|
|
2138
|
+
[session status table displayed]
|
|
2139
|
+
```
|
|
2140
|
+
|
|
2141
|
+
**Polling Interval**
|
|
2142
|
+
|
|
2143
|
+
Customize the polling interval for watch mode:
|
|
2144
|
+
|
|
2145
|
+
```bash
|
|
2146
|
+
# Poll every 15 seconds instead of default 30
|
|
2147
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch --watch-interval 15
|
|
2148
|
+
```
|
|
2149
|
+
|
|
2150
|
+
**Watch Mode Timeout**
|
|
2151
|
+
|
|
2152
|
+
Set a maximum time to wait for the session to reach running state. The `--max-wait-time` option accepts human-friendly duration formats:
|
|
2153
|
+
|
|
2154
|
+
```bash
|
|
2155
|
+
# 30 minutes (default)
|
|
2156
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch
|
|
2157
|
+
|
|
2158
|
+
# 5 minutes
|
|
2159
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch --max-wait-time 5m
|
|
2160
|
+
|
|
2161
|
+
# 2 hours
|
|
2162
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch --max-wait-time 2h
|
|
2163
|
+
|
|
2164
|
+
# 1 day
|
|
2165
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch --max-wait-time 1d
|
|
2166
|
+
|
|
2167
|
+
# 60 seconds
|
|
2168
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --watch --max-wait-time 60s
|
|
2169
|
+
```
|
|
2170
|
+
|
|
2171
|
+
**Supported timeout formats:**
|
|
2172
|
+
- `30s` - seconds
|
|
2173
|
+
- `5m` - minutes
|
|
2174
|
+
- `2h` - hours
|
|
2175
|
+
- `1d` - days
|
|
2176
|
+
|
|
2177
|
+
If the session does not reach running state within the specified timeout, the watch mode exits with a clear message:
|
|
2178
|
+
|
|
2179
|
+
```console
|
|
2180
|
+
Timeout: Session did not reach running state within 30m. Current status: provisioning. Exiting watch mode.
|
|
2181
|
+
```
|
|
2182
|
+
|
|
2183
|
+
**Output Formats**
|
|
2184
|
+
|
|
2185
|
+
Save session status to a file:
|
|
2186
|
+
|
|
2187
|
+
```bash
|
|
2188
|
+
# Save as JSON
|
|
2189
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --output-format json --output-basename /tmp/session_status
|
|
2190
|
+
# Creates: /tmp/session_status.json
|
|
2191
|
+
|
|
2192
|
+
# Save as CSV
|
|
2193
|
+
cloudos interactive-session status --session-id <SESSION_ID> --profile my_profile --output-format csv --output-basename /tmp/session_status
|
|
2194
|
+
# Creates: /tmp/session_status.csv
|
|
2195
|
+
```
|
|
2196
|
+
|
|
2197
|
+
#### Create Interactive Session
|
|
2198
|
+
|
|
2199
|
+
You can create and start a new interactive session using the `cloudos interactive-session create` command. This command provisions a new virtual environment with your specified configuration.
|
|
2200
|
+
|
|
2201
|
+
The command automatically loads API credentials and workspace information from your profile configuration, so you only need to specify the session-specific details.
|
|
2202
|
+
|
|
2203
|
+
**Basic Usage**
|
|
2204
|
+
|
|
2205
|
+
Create a simple Jupyter notebook session:
|
|
2206
|
+
|
|
2207
|
+
```bash
|
|
2208
|
+
cloudos interactive-session create \
|
|
2209
|
+
--profile my_profile \
|
|
2210
|
+
--name "My Analysis" \
|
|
2211
|
+
--session-type jupyter
|
|
2212
|
+
```
|
|
2213
|
+
|
|
2214
|
+
Create an RStudio session with specific R version:
|
|
2215
|
+
|
|
2216
|
+
```bash
|
|
2217
|
+
cloudos interactive-session create \
|
|
2218
|
+
--profile my_profile \
|
|
2219
|
+
--name "R Analysis" \
|
|
2220
|
+
--session-type rstudio \
|
|
2221
|
+
--r-version 4.4.2
|
|
2222
|
+
```
|
|
2223
|
+
|
|
2224
|
+
Create a VS Code session (AWS only):
|
|
2225
|
+
|
|
2226
|
+
```bash
|
|
2227
|
+
cloudos interactive-session create \
|
|
2228
|
+
--profile my_profile \
|
|
2229
|
+
--name "Development" \
|
|
2230
|
+
--session-type vscode
|
|
2231
|
+
```
|
|
2232
|
+
|
|
2233
|
+
Create a Spark cluster session with custom instance types (AWS only):
|
|
2234
|
+
|
|
2235
|
+
```bash
|
|
2236
|
+
cloudos interactive-session create \
|
|
2237
|
+
--profile my_profile \
|
|
2238
|
+
--name "Spark Analysis" \
|
|
2239
|
+
--session-type spark \
|
|
2240
|
+
--spark-master c5.2xlarge \
|
|
2241
|
+
--spark-core c5.xlarge \
|
|
2242
|
+
--spark-workers 3
|
|
2243
|
+
```
|
|
2244
|
+
|
|
2245
|
+
**Configuration Options**
|
|
2246
|
+
|
|
2247
|
+
You can customize your session with various options:
|
|
2248
|
+
|
|
2249
|
+
```bash
|
|
2250
|
+
cloudos interactive-session create \
|
|
2251
|
+
--profile my_profile \
|
|
2252
|
+
--name "Advanced Session" \
|
|
2253
|
+
--session-type jupyter \
|
|
2254
|
+
--instance c5.2xlarge \
|
|
2255
|
+
--storage 1000 \
|
|
2256
|
+
--spot \
|
|
2257
|
+
--shared \
|
|
2258
|
+
--cost-limit 50.0 \
|
|
2259
|
+
--shutdown-in 8h
|
|
2260
|
+
```
|
|
2261
|
+
|
|
2262
|
+
**Required for Each Session:**
|
|
2263
|
+
- `--name`: Session name (1-100 characters)
|
|
2264
|
+
- `--session-type`: Type of backend - `jupyter`, `vscode`, `rstudio`, or `spark` (platform dependent)
|
|
2265
|
+
|
|
2266
|
+
**Optional Configuration:**
|
|
2267
|
+
- `--instance`: Instance type (default depends on execution platform: `c5.xlarge` for AWS, `Standard_F1s` for Azure)
|
|
2268
|
+
- `--storage`: Storage in GB (default: 500, range: 100-5000)
|
|
2269
|
+
- `--spot`: Use spot instances (AWS only, cost-saving)
|
|
2270
|
+
- `--shared`: Make session accessible to workspace members
|
|
2271
|
+
- `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
|
|
2272
|
+
- `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
|
|
2273
|
+
|
|
2274
|
+
**Data & Storage Management:**
|
|
2275
|
+
- `--mount`: Mount a data file into the session. Supports both CloudOS datasets and S3 files (AWS only). Format: `project_name/dataset_path` (e.g., `leila-test/Data/file.csv`) or `s3://bucket/path/to/file` (e.g., `s3://my-bucket/data/file.csv`). Can be used multiple times.
|
|
2276
|
+
- `--link`: Link a folder into the session for read/write access (AWS only). Supports S3 folders and CloudOS folders. Format: `s3://bucket/prefix` (e.g., `s3://my-bucket/data/`) or `project_name/folder_path` (e.g., `leila-test/AnalysesResults/analysis_id/results`). Can be used multiple times. **Note:** Linking is not supported on Azure. Use CloudOS file explorer for data access.
|
|
2277
|
+
|
|
2278
|
+
**Backend-Specific:**
|
|
2279
|
+
- `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`)
|
|
2280
|
+
- `--spark-master`: Master instance type for Spark (default: `c5.2xlarge`)
|
|
2281
|
+
- `--spark-core`: Core instance type for Spark (default: `c5.xlarge`)
|
|
2282
|
+
- `--spark-workers`: Initial worker count for Spark (default: 1)
|
|
2283
|
+
- `--verbose`: Show detailed progress messages
|
|
2284
|
+
|
|
2285
|
+
|
|
2286
|
+
**Data Management**
|
|
2287
|
+
|
|
2288
|
+
CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
|
|
2289
|
+
- you can load data directly into the session (i.e. files are copied into the session's mounted-data volume)
|
|
2290
|
+
- you can link folders to your session (i.e the folders are sym-linked to the session). This works only for folders (S3-based) and only in AWS enviornments.
|
|
2291
|
+
|
|
2292
|
+
|
|
2293
|
+
**Data Mounting Examples**
|
|
2294
|
+
|
|
2295
|
+
Mount a file from File Explorer:
|
|
2296
|
+
|
|
2297
|
+
```bash
|
|
2298
|
+
cloudos interactive-session create \
|
|
2299
|
+
--profile my_profile \
|
|
2300
|
+
--name "Data Analysis" \
|
|
2301
|
+
--session-type jupyter \
|
|
2302
|
+
--mount "my_project/training_data.csv"
|
|
2303
|
+
```
|
|
2304
|
+
|
|
2305
|
+
Link an S3 bucket:
|
|
2306
|
+
|
|
2307
|
+
```bash
|
|
2308
|
+
cloudos interactive-session create \
|
|
2309
|
+
--profile my_profile \
|
|
2310
|
+
--name "S3 Access" \
|
|
2311
|
+
--session-type jupyter \
|
|
2312
|
+
--link "s3://my-results-bucket/output/"
|
|
2313
|
+
```
|
|
2314
|
+
|
|
2315
|
+
|
|
2316
|
+
**Output Display**
|
|
2317
|
+
|
|
2318
|
+
The session creation output displays a success message with session details:
|
|
2319
|
+
|
|
2320
|
+
```bash
|
|
2321
|
+
cloudos interactive-session create \
|
|
2322
|
+
--profile my_profile \
|
|
2323
|
+
--name "My Session" \
|
|
2324
|
+
--session-type jupyter
|
|
2325
|
+
```
|
|
2326
|
+
|
|
2327
|
+
The output shows the session details including:
|
|
2328
|
+
- Session ID
|
|
2329
|
+
- Session name
|
|
2330
|
+
- Backend type (jupyter, vscode, rstudio, spark)
|
|
2331
|
+
- Current status (scheduled, initialising, setup, running, stopped)
|
|
2332
|
+
|
|
2333
|
+
|
|
1970
2334
|
### Datasets
|
|
1971
2335
|
|
|
1972
2336
|
Manage files and folders within your CloudOS File Explorer programmatically. These commands provide comprehensive file management capabilities for organizing research data and results.
|