File size: 6,245 Bytes
76d9c4f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
---
title: vessl workspace
version: EN
---

### Overview

Run `vessl workspace --help` to view the list of commands, or `vessl workspace [COMMAND] --help` to view individual command instructions.

### Create a workspace

```bash
vessl workspace create [OPTIONS] NAME
```

| Argument | Description    |
| -------- | -------------- |
| `NAME`   | workspace name |

| Option                             | Description                                                                                                                                                |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-c`, `--cluster`                  | Cluster name (must be specified before other options)                                                                                                      |
| `--node`                           | Cluster nodes. Defaults to all nodes in cluster.                                                                                                           |
| `-r`, `--resource`                 | Resource type to run an experiment (for managed cluster only)                                                                                              |
| `--processor-type`                 | `CPU` or `GPU` (for custom cluster only)                                                                                                                   |
| `--cpu-limit`                      | Number of vCPUs (for custom cluster only)                                                                                                                  |
| `--memory-limit`                   | Memory limit in GiB (for custom cluster only)                                                                                                              |
| `--gpu-type`                       | GPU type (for custom cluster only) ex. `Tesla-K80`                                                                                                         |
| `--gpu-limit`                      | Number of GPU cores (for custom cluster only)                                                                                                              |
| `-i`, `--image-url`                | Kernel docker image URL ex. `vessl/kernels:py36.full-cpu`                                                                          |
| `--max-hours`                      | Maximum number of hours to run workspace. Defaults to 24.                                                                                                  |
| `--dataset` (_multiple_)           | Dataset mounts in the form of `[mount_path]:[dataset_name]` ex. `<code>`--dataset /input:mnist`                                |
| `--upload-local-file` _(multiple)_ | Upload local file. Format: [local_path] or [local_path]:[remote_path].ex. `--upload-local-file my-project:/root/my-project`` |
| `--root-volume-size`               | Root volume size (defaults to `100Gi`)                                                                                                                     |
| `-p`, `--port` _(multiple)_        | Format: \[expose\_type] \[port] \[name], ex. `-p 'tcp 22 ssh'`. Jupyter and SSH ports exist by default.                                                    |
| `--init-script`                    | Custom init script                                                                                                                                         |

###

### Connect to a running workspace

```bash
vessl workspace ssh [OPTIONS]
```

| Option     | Description          |
| ---------- | -------------------- |
| --key-path | SSH private key path |

### Connect to workspaces via VSCode Remote-SSH <a href="#savvihub-workspace-vscode" id="savvihub-workspace-vscode"></a>

```bash
vessl workspace vscode [OPTIONS]
```

| Option     | Description          |
| ---------- | -------------------- |
| --key-path | SSH private key path |

```bash
$ vessl workspace vscode
Updated '/Users/johndoe/.ssh/config'.
```

### Backup the home directory of the workspace <a href="#savvihub-workspace-backup" id="savvihub-workspace-backup"></a>

Create a zip file at `/tmp/workspace-backup.zip` and uploads the backup to VESSL server.

<Note>You should run this command inside a running workspace.</Note>

```bash
vessl workspace backup
```

```bash
$ vessl workspace backup
Successfully uploaded 1 out of 1 file(s).
```

### Restore workspace home directory from a backup.  <a href="#savvihub-workspace-restore" id="savvihub-workspace-restore"></a>

Download the zip file to `/tmp/workspace-backup.zip` and extract to `/root/`.

<Note>You should run this command inside a running workspace.</Note>


```bash
vessl workspace restore
```

```bash
$ vessl workspace restore
[?] Select workspace: rash-uncle (backup created 13 minutes ago)
 > rash-uncle (backup created 13 minutes ago)
   hazel-saver (backup created 2 days ago)

Successfully downloaded 1 out of 1 file(s).
```

### List all workspaces <a href="#usd-savvihub-image-list" id="usd-savvihub-image-list"></a>

```
vessl workspace list
```

### View information on the workspace

```
vessl workspace read ID
```

| Argument | Description  |
| -------- | ------------ |
| `ID`     | Workspace ID |

### View logs of the workspace container

```
vessl workspace logs ID
```

| Argument | Description  |
| -------- | ------------ |
| `ID`     | Workspace ID |

| Option   | Description                                               |
| -------- | --------------------------------------------------------- |
| `--tail` | Number of lines to display from the end (defaults to 200) |

### Start a workspace container

```
vessl workspace start ID
```

| Argument | Description  |
| -------- | ------------ |
| `ID`     | Workspace ID |

### Stop a workspace container

```
vessl workspace stop ID
```

| Argument | Description  |
| -------- | ------------ |
| `ID`     | Workspace ID |

### Terminate a workspace container

```
vessl workspace terminate ID
```

| Argument | Description  |
| -------- | ------------ |
| `ID`     | Workspace ID |