cloudos-cli 2.85.0__tar.gz → 2.87.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.
Files changed (76) hide show
  1. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/PKG-INFO +212 -120
  2. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/README.md +211 -119
  3. cloudos_cli-2.87.0/cloudos_cli/_version.py +1 -0
  4. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/clos.py +68 -4
  5. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/interactive_session/cli.py +356 -138
  6. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/interactive_session/interactive_session.py +184 -252
  7. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/jobs/cli.py +38 -3
  8. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/jobs/job.py +151 -0
  9. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/queue/cli.py +5 -1
  10. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/queue/queue.py +29 -2
  11. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/details.py +307 -191
  12. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/PKG-INFO +212 -120
  13. cloudos_cli-2.85.0/cloudos_cli/_version.py +0 -1
  14. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/LICENSE +0 -0
  15. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/__init__.py +0 -0
  16. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/__main__.py +0 -0
  17. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/bash/__init__.py +0 -0
  18. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/bash/cli.py +0 -0
  19. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/configure/__init__.py +0 -0
  20. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/configure/cli.py +0 -0
  21. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/configure/configure.py +0 -0
  22. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/constants.py +0 -0
  23. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/cost/__init__.py +0 -0
  24. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/cost/cost.py +0 -0
  25. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/cromwell/__init__.py +0 -0
  26. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/cromwell/cli.py +0 -0
  27. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/datasets/__init__.py +0 -0
  28. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/datasets/cli.py +0 -0
  29. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/datasets/datasets.py +0 -0
  30. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/import_wf/__init__.py +0 -0
  31. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/import_wf/import_wf.py +0 -0
  32. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/interactive_session/__init__.py +0 -0
  33. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/jobs/__init__.py +0 -0
  34. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/link/__init__.py +0 -0
  35. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/link/cli.py +0 -0
  36. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/link/link.py +0 -0
  37. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/logging/__init__.py +0 -0
  38. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/logging/logger.py +0 -0
  39. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/procurement/__init__.py +0 -0
  40. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/procurement/cli.py +0 -0
  41. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/procurement/images.py +0 -0
  42. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/projects/__init__.py +0 -0
  43. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/projects/cli.py +0 -0
  44. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/queue/__init__.py +0 -0
  45. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/related_analyses/__init__.py +0 -0
  46. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/related_analyses/related_analyses.py +0 -0
  47. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/__init__.py +0 -0
  48. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/array_job.py +0 -0
  49. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/cli_helpers.py +0 -0
  50. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/cloud.py +0 -0
  51. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/errors.py +0 -0
  52. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/last_wf.py +0 -0
  53. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/requests.py +0 -0
  54. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/utils/resources.py +0 -0
  55. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/workflows/__init__.py +0 -0
  56. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli/workflows/cli.py +0 -0
  57. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/SOURCES.txt +0 -0
  58. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/dependency_links.txt +0 -0
  59. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/entry_points.txt +0 -0
  60. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/requires.txt +0 -0
  61. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/cloudos_cli.egg-info/top_level.txt +0 -0
  62. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/setup.cfg +0 -0
  63. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/setup.py +0 -0
  64. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/__init__.py +0 -0
  65. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/functions_for_pytest.py +0 -0
  66. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_cli_project_create.py +0 -0
  67. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_cost/__init__.py +0 -0
  68. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_cost/test_job_cost.py +0 -0
  69. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_error_messages.py +0 -0
  70. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_interactive_session/__init__.py +0 -0
  71. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_interactive_session/test_create_session.py +0 -0
  72. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_interactive_session/test_list_sessions.py +0 -0
  73. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_logging/__init__.py +0 -0
  74. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_logging/test_logger.py +0 -0
  75. {cloudos_cli-2.85.0 → cloudos_cli-2.87.0}/tests/test_related_analyses/__init__.py +0 -0
  76. {cloudos_cli-2.85.0 → cloudos_cli-2.87.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.85.0
3
+ Version: 2.87.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
@@ -100,9 +100,10 @@ Python package for interacting with CloudOS
100
100
  - [Use multiple projects for files in `--parameter` option](#use-multiple-projects-for-files-in---parameter-option)
101
101
  - [Interactive Sessions](#interactive-sessions)
102
102
  - [List Interactive Sessions](#list-interactive-sessions)
103
+ - [Create Interactive Session](#create-interactive-session)
103
104
  - [Get Interactive Session Status](#get-interactive-session-status)
104
105
  - [Pause Interactive Session](#pause-interactive-session)
105
- - [Create Interactive Session](#create-interactive-session)
106
+ - [Resume Interactive Session](#resume-interactive-session)
106
107
  - [Datasets](#datasets)
107
108
  - [List Files](#list-files)
108
109
  - [Move Files](#move-files)
@@ -435,7 +436,7 @@ Job queues are required for running jobs using AWS batch executor. The available
435
436
 
436
437
  #### List Queues
437
438
 
438
- This command allows you to view available computational queues and their configurations. You can get a summary of all available workspace job queues in three different output formats using the `--output-format` option:
439
+ This command allows you to view available computational queues and their configurations. By default, both regular workspace queues and system queues are displayed. You can get a summary of all available job queues in three different output formats using the `--output-format` option:
439
440
 
440
441
  - **stdout** (default): Displays a rich formatted table directly in the terminal with pagination and visual formatting
441
442
  - **csv**: Saves queue data to a CSV file with a selection of available queue information, or all information using the `--all-fields` flag
@@ -449,6 +450,12 @@ cloudos queue list --profile my_profile
449
450
  cloudos queue list --profile my_profile --output-format stdout
450
451
  ```
451
452
 
453
+ To exclude system queues and show only workspace queues:
454
+
455
+ ```bash
456
+ cloudos queue list --profile my_profile --exclude-system-queues
457
+ ```
458
+
452
459
  To save all available job queues in JSON format:
453
460
 
454
461
  ```bash
@@ -471,7 +478,7 @@ cloudos queue list --profile my_profile --output-format csv
471
478
 
472
479
  **Job queues for platform workflows**
473
480
 
474
- Platform workflows (those provided by CloudOS in your workspace as modules) run on separate and specific AWS batch queues. Therefore, CloudOS will automatically assign the valid queue and you should not specify any queue using the `--job-queue` parameter. Any attempt to use this parameter will be ignored. Examples of such platform workflows are "System Tools" and "Data Factory" workflows.
481
+ Platform workflows (those provided by CloudOS in your workspace as modules) run on separate and specific AWS batch queues (system queues). Therefore, CloudOS will automatically assign the valid queue and you should not specify any queue using the `--job-queue` parameter. Any attempt to use this parameter will be ignored. Examples of such platform workflows are "System Tools" and "Data Factory" workflows.
475
482
 
476
483
 
477
484
  ### Workflow
@@ -885,7 +892,7 @@ You can find specific jobs within your workspace using the filtering options. Fi
885
892
  - **`--filter-job-id`**: Filter jobs by specific job ID (exact match required)
886
893
  - **`--filter-only-mine`**: Show only jobs belonging to the current user
887
894
  - **`--filter-owner`**: Show only jobs for the specified owner (exact match required, e.g., "John Doe")
888
- - **`--filter-queue`**: Filter jobs by queue name (only applies to batch jobs)
895
+ - **`--filter-queue`**: Filter jobs by queue name (works with both regular and system queues; only applies to batch jobs)
889
896
 
890
897
  **Filtering Examples**
891
898
 
@@ -2005,13 +2012,13 @@ The table displays sessions with pagination controls (press `n` for next page, `
2005
2012
 
2006
2013
  ```console
2007
2014
  Interactive Sessions
2008
- ┏━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┓
2009
- ┃ Status ┃ Name ┃ Type ┃ ID ┃ Owner ┃
2010
- ┡━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━┩
2011
- │ paused │ cloudosR │ RStudio │ 69aee0dba197… │ Leila │
2012
- │ running │ analysis-dev │ Jupyter │ 69ae972a18f0… │ John │
2013
- │ paused │ test_session │ VS Code │ 69a996c098ab… │ James │
2014
- └─────────┴──────────────┴────────────────────┴───────────────┴────────┘
2015
+ ┏━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━┓
2016
+ ┃ Status ┃ Name ┃ Type ┃ ID ┃ Owner ┃
2017
+ ┡━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━┩
2018
+ │ paused │ cloudosR │ RStudio │ 69aee0dba197… │ Leila │
2019
+ │ running │ analysis-dev │ Jupyter │ 69ae972a18f0… │ John │
2020
+ │ paused │ test_session │ VS Code │ 69a996c098ab… │ James │
2021
+ └─────────┴──────────────┴────────────────┴───────────────┴────────┘
2015
2022
 
2016
2023
  Total sessions: 15
2017
2024
  Page: 1 of 3
@@ -2072,6 +2079,172 @@ cloudos interactive-session list --profile my_profile --table-columns "status,na
2072
2079
 
2073
2080
  Available columns: `backend`, `cost`, `cost_limit`, `created_at`, `id`, `instance`, `name`, `owner`, `project`, `resources`, `runtime`, `saved_at`, `spot`, `status`, `time_left`, `type`, `version`
2074
2081
 
2082
+ #### Create Interactive Session
2083
+
2084
+ 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.
2085
+
2086
+ The command automatically loads API credentials and workspace information from your profile configuration, so you only need to specify the session-specific details.
2087
+
2088
+ **Basic Usage**
2089
+
2090
+ Create a simple Jupyter notebook session:
2091
+
2092
+ ```bash
2093
+ cloudos interactive-session create \
2094
+ --profile my_profile \
2095
+ --name "My Analysis" \
2096
+ --session-type jupyter
2097
+ ```
2098
+
2099
+ Create an RStudio session with specific R version:
2100
+
2101
+ ```bash
2102
+ cloudos interactive-session create \
2103
+ --profile my_profile \
2104
+ --name "R Analysis" \
2105
+ --session-type rstudio \
2106
+ --r-version 4.4.2
2107
+ ```
2108
+
2109
+ Create a VS Code session (AWS only):
2110
+
2111
+ ```bash
2112
+ cloudos interactive-session create \
2113
+ --profile my_profile \
2114
+ --name "Development" \
2115
+ --session-type vscode
2116
+ ```
2117
+
2118
+ Create a Spark cluster session with custom instance types (AWS only):
2119
+
2120
+ ```bash
2121
+ cloudos interactive-session create \
2122
+ --profile my_profile \
2123
+ --name "Spark Analysis" \
2124
+ --session-type spark \
2125
+ --spark-master c5.2xlarge \
2126
+ --spark-core c5.xlarge \
2127
+ --spark-workers 3
2128
+ ```
2129
+
2130
+ **Configuration Options**
2131
+
2132
+ You can customize your session with various options:
2133
+
2134
+ ```bash
2135
+ cloudos interactive-session create \
2136
+ --profile my_profile \
2137
+ --name "Advanced Session" \
2138
+ --session-type jupyter \
2139
+ --instance c5.2xlarge \
2140
+ --storage 1000 \
2141
+ --spot \
2142
+ --shared \
2143
+ --cost-limit 50.0 \
2144
+ --shutdown-in 8h
2145
+ ```
2146
+
2147
+ **Required for Each Session:**
2148
+ - `--name`: Session name (1-100 characters)
2149
+ - `--session-type`: Type of backend - `jupyter`, `vscode`, `rstudio`, or `spark` (platform dependent)
2150
+
2151
+ **Optional Configuration:**
2152
+ - `--instance`: Instance type (default depends on execution platform: `c5.xlarge` for AWS, `Standard_F1s` for Azure)
2153
+ - `--storage`: Storage in GB (default: 500, range: 100-5000)
2154
+ - `--spot`: Use spot instances (AWS only, cost-saving)
2155
+ - `--shared`: Make session accessible to workspace members
2156
+ - `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
2157
+ - `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
2158
+
2159
+ **Data & Storage Management:**
2160
+ - `--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.
2161
+ - `--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.
2162
+
2163
+ **Backend-Specific:**
2164
+ - `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`)
2165
+ - `--spark-master`: Master instance type for Spark (default: `c5.2xlarge`)
2166
+ - `--spark-core`: Core instance type for Spark (default: `c5.xlarge`)
2167
+ - `--spark-workers`: Initial worker count for Spark (default: 1)
2168
+ - `--verbose`: Show detailed progress messages
2169
+
2170
+
2171
+ **Data Management**
2172
+
2173
+ CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
2174
+ - you can load data directly into the session (i.e. files are copied into the session's mounted-data volume)
2175
+ - 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.
2176
+
2177
+
2178
+ **Data Mounting Examples**
2179
+
2180
+ Mount a file from File Explorer:
2181
+
2182
+ ```bash
2183
+ cloudos interactive-session create \
2184
+ --profile my_profile \
2185
+ --name "Data Analysis" \
2186
+ --session-type jupyter \
2187
+ --mount "my_project/training_data.csv"
2188
+ ```
2189
+
2190
+ Link an S3 bucket:
2191
+
2192
+ ```bash
2193
+ cloudos interactive-session create \
2194
+ --profile my_profile \
2195
+ --name "S3 Access" \
2196
+ --session-type jupyter \
2197
+ --link "s3://my-results-bucket/output/"
2198
+ ```
2199
+
2200
+ Link multiple S3 buckets:
2201
+
2202
+ ```bash
2203
+ cloudos interactive-session create \
2204
+ --profile my_profile \
2205
+ --name "Multi-S3 Session" \
2206
+ --session-type jupyter \
2207
+ --link "s3://input-bucket/data/" \
2208
+ --link "s3://output-bucket/results/"
2209
+ ```
2210
+
2211
+
2212
+
2213
+ This will show progress updates like:
2214
+
2215
+ ```console
2216
+ ✓ Interactive Session Created Successfully
2217
+
2218
+ ┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┓
2219
+ ┃ Property ┃ Value ┃
2220
+ ┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━┩
2221
+ │ Session ID │ 69aee0dba197abc123 │
2222
+ │ Name │ Ready Session │
2223
+ │ Backend │ awsJupyterNotebook │
2224
+ │ Status │ initialising │
2225
+ └─────────────┴─────────────────────┘
2226
+ ```
2227
+ ```
2228
+
2229
+ **Output Display**
2230
+
2231
+ The session creation output displays a success message with session details:
2232
+
2233
+ ```bash
2234
+ cloudos interactive-session create \
2235
+ --profile my_profile \
2236
+ --name "My Session" \
2237
+ --session-type jupyter
2238
+ ```
2239
+
2240
+ The output shows the session details including:
2241
+ - Session ID
2242
+ - Session name
2243
+ - Backend type (jupyter, vscode, rstudio, spark)
2244
+ - Current status (scheduled, initialising, setup, running, paused)
2245
+
2246
+
2247
+
2075
2248
  #### Get Interactive Session Status
2076
2249
 
2077
2250
  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.
@@ -2093,7 +2266,7 @@ The command displays session information in a formatted table:
2093
2266
  ║ Session ID ║ 69bc00cb1488084e5a6cae70 ║
2094
2267
  ║ Name ║ analysis-dev (linked) ║
2095
2268
  ║ Status ║ running ║
2096
- ║ Backend ║ awsJupyterNotebook
2269
+ ║ Backend ║ Jupyter
2097
2270
  ║ Owner ║ John Doe ║
2098
2271
  ║ Project ║ research ║
2099
2272
  ║ Instance Type ║ c5.xlarge ║
@@ -2274,7 +2447,7 @@ Pausing session...
2274
2447
  Status: shutting_down
2275
2448
  Status: uploading_data
2276
2449
  Status: cleaning_up
2277
- Status: stopped
2450
+ Status: paused
2278
2451
  ✓ Session paused successfully
2279
2452
  ```
2280
2453
 
@@ -2350,142 +2523,61 @@ The command automatically loads from profile (via `@with_profile_config` decorat
2350
2523
  - `--ssl-cert`: Path to SSL certificate file
2351
2524
  - `--profile`: Profile to use from config file (default: default profile)
2352
2525
 
2353
- #### Create Interactive Session
2526
+ #### Resume Interactive Session
2354
2527
 
2355
- 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.
2528
+ Resume a paused interactive session with optional configuration updates. You can change instance type, storage, cost limit, auto-shutdown time, and mount additional data files or folders when resuming.
2356
2529
 
2357
- The command automatically loads API credentials and workspace information from your profile configuration, so you only need to specify the session-specific details.
2358
2530
 
2359
2531
  **Basic Usage**
2360
2532
 
2361
- Create a simple Jupyter notebook session:
2362
-
2363
- ```bash
2364
- cloudos interactive-session create \
2365
- --profile my_profile \
2366
- --name "My Analysis" \
2367
- --session-type jupyter
2368
- ```
2369
-
2370
- Create an RStudio session with specific R version:
2533
+ Resume a paused session:
2371
2534
 
2372
2535
  ```bash
2373
- cloudos interactive-session create \
2374
- --profile my_profile \
2375
- --name "R Analysis" \
2376
- --session-type rstudio \
2377
- --r-version 4.4.2
2536
+ cloudos interactive-session resume --session-id <SESSION_ID> --profile my_profile
2378
2537
  ```
2379
2538
 
2380
- Create a VS Code session (AWS only):
2539
+ Resume with updated instance type:
2381
2540
 
2382
2541
  ```bash
2383
- cloudos interactive-session create \
2542
+ cloudos interactive-session resume \
2543
+ --session-id <SESSION_ID> \
2384
2544
  --profile my_profile \
2385
- --name "Development" \
2386
- --session-type vscode
2545
+ --instance c5.2xlarge
2387
2546
  ```
2388
2547
 
2389
- Create a Spark cluster session with custom instance types (AWS only):
2548
+ Resume with multiple updates:
2390
2549
 
2391
2550
  ```bash
2392
- cloudos interactive-session create \
2551
+ cloudos interactive-session resume \
2552
+ --session-id <SESSION_ID> \
2393
2553
  --profile my_profile \
2394
- --name "Spark Analysis" \
2395
- --session-type spark \
2396
- --spark-master c5.2xlarge \
2397
- --spark-core c5.xlarge \
2398
- --spark-workers 3
2399
- ```
2400
-
2401
- **Configuration Options**
2402
-
2403
- You can customize your session with various options:
2404
-
2405
- ```bash
2406
- cloudos interactive-session create \
2407
- --profile my_profile \
2408
- --name "Advanced Session" \
2409
- --session-type jupyter \
2410
- --instance c5.2xlarge \
2554
+ --instance m5.xlarge \
2411
2555
  --storage 1000 \
2412
- --spot \
2413
- --shared \
2414
2556
  --cost-limit 50.0 \
2415
- --shutdown-in 8h
2557
+ --shutdown-in 12h
2416
2558
  ```
2417
2559
 
2418
- **Required for Each Session:**
2419
- - `--name`: Session name (1-100 characters)
2420
- - `--session-type`: Type of backend - `jupyter`, `vscode`, `rstudio`, or `spark` (platform dependent)
2421
-
2422
- **Optional Configuration:**
2423
- - `--instance`: Instance type (default depends on execution platform: `c5.xlarge` for AWS, `Standard_F1s` for Azure)
2424
- - `--storage`: Storage in GB (default: 500, range: 100-5000)
2425
- - `--spot`: Use spot instances (AWS only, cost-saving)
2426
- - `--shared`: Make session accessible to workspace members
2427
- - `--cost-limit`: Compute cost limit in USD (default: -1 for unlimited)
2428
- - `--shutdown-in`: Auto-shutdown duration (e.g., `8h`, `2d`, `30m`)
2429
-
2430
- **Data & Storage Management:**
2431
- - `--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.
2432
- - `--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.
2433
-
2434
- **Backend-Specific:**
2435
- - `--r-version`: R version for RStudio (options: `4.4.2`, `4.5.2`) - **optional for rstudio** (default: `4.4.2`)
2436
- - `--spark-master`: Master instance type for Spark (default: `c5.2xlarge`)
2437
- - `--spark-core`: Core instance type for Spark (default: `c5.xlarge`)
2438
- - `--spark-workers`: Initial worker count for Spark (default: 1)
2439
- - `--verbose`: Show detailed progress messages
2440
-
2441
-
2442
- **Data Management**
2443
-
2444
- CloudOS CLI supports multiple ways to access data in interactive sessions, depending on your execution platform:
2445
- - you can load data directly into the session (i.e. files are copied into the session's mounted-data volume)
2446
- - 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.
2447
-
2560
+ **Mount Additional Data**
2448
2561
 
2449
- **Data Mounting Examples**
2450
-
2451
- Mount a file from File Explorer:
2562
+ Resume and mount additional files:
2452
2563
 
2453
2564
  ```bash
2454
- cloudos interactive-session create \
2565
+ cloudos interactive-session resume \
2566
+ --session-id <SESSION_ID> \
2455
2567
  --profile my_profile \
2456
- --name "Data Analysis" \
2457
- --session-type jupyter \
2458
- --mount "my_project/training_data.csv"
2568
+ --mount my-project/Data/new-dataset.csv \
2569
+ --mount s3://my-bucket/data/file.txt
2459
2570
  ```
2460
2571
 
2461
- Link an S3 bucket:
2462
-
2463
- ```bash
2464
- cloudos interactive-session create \
2465
- --profile my_profile \
2466
- --name "S3 Access" \
2467
- --session-type jupyter \
2468
- --link "s3://my-results-bucket/output/"
2469
- ```
2470
2572
 
2573
+ **Configuration Updates**
2471
2574
 
2472
- **Output Display**
2473
-
2474
- The session creation output displays a success message with session details:
2475
-
2476
- ```bash
2477
- cloudos interactive-session create \
2478
- --profile my_profile \
2479
- --name "My Session" \
2480
- --session-type jupyter
2481
- ```
2482
-
2483
- The output shows the session details including:
2484
- - Session ID
2485
- - Session name
2486
- - Backend type (jupyter, vscode, rstudio, spark)
2487
- - Current status (scheduled, initialising, setup, running, paused)
2575
+ All configuration parameters are optional. If not specified, the session resumes with its previous configuration.
2488
2576
 
2577
+ - `--instance <TYPE>` - Change instance type (validated by platform)
2578
+ - `--storage <GB>` - Update storage size (100-5000 GB)
2579
+ - `--cost-limit <USD>` - Update compute cost limit (-1 for unlimited)
2580
+ - `--shutdown-in <DURATION>` - Update auto-shutdown time (e.g., 8h, 2d)
2489
2581
 
2490
2582
  ### Datasets
2491
2583