Skip to content

Commit 7146f28

Browse files
authored
Merge pull request #6 from spheronFdn/rekpero/mainnet-changes
feat: enhance GPU deployment documentation with SSH access instructions
2 parents 6ed59a6 + c49142b commit 7146f28

File tree

4 files changed

+375
-6
lines changed

4 files changed

+375
-6
lines changed

content/rent-gpu/deploy-container/with-cli.mdx

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,94 @@ Here is the logs for the Lease ID: 44
281281
...
282282
```
283283
284+
### SSH Access to Deployment
285+
286+
To access your deployment via SSH for more convenient management and advanced operations, follow these steps:
287+
288+
1. **Generate SSH Key Pair (if you don't already have one)**
289+
290+
Generate an SSH key pair on your local machine:
291+
292+
```sh
293+
ssh-keygen -t rsa -b 4096 -C "[email protected]"
294+
```
295+
296+
Follow the prompts to save the key. By default, the keys will be saved in `~/.ssh/id_rsa` (private key) and `~/.ssh/id_rsa.pub` (public key).
297+
298+
2. **Create a Deployment with SSH Support**
299+
300+
Ensure your deployment uses an SSH-compatible image and exposes port 22. Here's an example configuration:
301+
302+
```yaml
303+
services:
304+
pytorch-server:
305+
image: spheronfdn/pytorch:latest
306+
expose:
307+
- port: 22
308+
as: 22
309+
to:
310+
- global: true
311+
```
312+
313+
3. **Set Your SSH Public Key**
314+
315+
Make sure to wait for the deployment to be ready before setting the SSH key. Add your public SSH key to be used with deployments:
316+
317+
```sh
318+
sphnctl deployment ssh set-key ~/.ssh/id_rsa.pub
319+
```
320+
321+
The result will show:
322+
```
323+
Public key set successfully
324+
```
325+
326+
4. **Enable SSH for Your Deployment**
327+
328+
Enable SSH access for your specific deployment:
329+
330+
```sh
331+
sphnctl deployment ssh enable --lid <LID>
332+
```
333+
334+
For example:
335+
```sh
336+
sphnctl deployment ssh enable --lid 44
337+
```
338+
339+
The output will provide connection details:
340+
```
341+
Enabling SSH access to the deployment...
342+
User: root
343+
Deployment ID: 44
344+
Public Key: /Users/username/.ssh/id_rsa.pub
345+
Waiting for deployment to be ready...
346+
Deployment is ready...
347+
SSH port: 32496
348+
SSH host: provider.thor.gpufarm.xyz
349+
Please use the following command to connect to the deployment:
350+
ssh -i <private-key> -p 32496 [email protected]
351+
```
352+
353+
5. **Connect via SSH**
354+
355+
Use the provided command to connect to your deployment:
356+
357+
```sh
358+
ssh -i ~/.ssh/id_rsa -p 32496 [email protected]
359+
```
360+
361+
<Callout type="info">
362+
**NOTE:** SSH access requires that your deployment use an SSH-compatible image and that the provider supports SSH connections. Some Spheron-supported images with SSH access include:
363+
364+
- [spheronfdn/pytorch:latest](https://github.com/spheronFdn/awesome-spheron/blob/main/pytorch/spheron.yaml)
365+
- [spheronfdn/tensorflow:latest](https://github.com/spheronFdn/awesome-spheron/blob/main/tensorflow/spheron.yaml)
366+
- [spheronfdn/cuda:12.3.1-devel-ubuntu22.04](https://github.com/spheronFdn/awesome-spheron/blob/main/nvidia-cuda-devel/spheron.yaml)
367+
- [spheronfdn/cuda:12.4.1-cudnn-devel-ubuntu22.04](https://github.com/spheronFdn/awesome-spheron/blob/main/nvidia-cudnn-devel/spheron.yaml)
368+
- [spheronfdn/ubuntu:22.04](https://github.com/spheronFdn/awesome-spheron/blob/main/ubuntu22/spheron.yaml)
369+
- [spheronfdn/ubuntu:24.04](https://github.com/spheronFdn/awesome-spheron/blob/main/ubuntu24/spheron.yaml)
370+
</Callout>
371+
284372
### Connect to the deployment shell
285373
286374
To connect to the deployment shell, you need to run this command:

content/rent-gpu/fizz-vs-provider.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ sphnctl deployment logs --lid 123
147147

148148
- Basic logging capabilities
149149
- Startup logs available - to check what's happening during the startup of your application
150-
- No real-time streaming
151150
- Limited filtering options
152151
- Detailed event tracking - you can see all the events happening in your deployment
153152

content/rent-gpu/icl.mdx

Lines changed: 132 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ It's structured into several key sections:
2222
10. [Shared Memory (SHM) Support](/rent-gpu/icl#10-shared-memory-shm-support)
2323
11. [Advanced Placement Attributes](/rent-gpu/icl#11-advanced-placement-attributes)
2424
12. [Mac Deployment Support](/rent-gpu/icl#12-mac-deployment-support)
25+
13. [GPU VRAM Minimum Requirements](/rent-gpu/icl#13-gpu-vram-minimum-requirements)
2526

2627
<Callout type="info">
2728
**NOTE:** For examples of deployment configurations:
@@ -74,8 +75,6 @@ When configuring port exposure for your services, keep these points in mind:
7475
as: 80
7576
to:
7677
- global: true
77-
accept:
78-
- www.yoursite.com
7978
```
8079
8180
### Port Range
@@ -439,6 +438,42 @@ gpu:
439438
</Callout>
440439

441440

441+
#### Configuring VRAM Requirements
442+
443+
You can specify the minimum VRAM requirement using the `req_vram` attribute in your GPU configuration. Here's an example:
444+
445+
```yaml
446+
profiles:
447+
compute:
448+
gpu-intensive:
449+
resources:
450+
cpu:
451+
units: 4.0
452+
memory:
453+
size: 8Gi
454+
storage:
455+
size: 20Gi
456+
gpu:
457+
units: 1
458+
attributes:
459+
vendor:
460+
nvidia:
461+
- model: rtx3090
462+
req_vram: ">=80"
463+
```
464+
465+
The `req_vram` attribute accepts a string value with a comparison operator followed by the required VRAM amount in percentage. The supported comparison operators are:
466+
467+
- `>=` - Greater than or equal to
468+
- `>` - Greater than
469+
- `<=` - Less than or equal to
470+
- `<` - Less than
471+
472+
Examples:
473+
- `req_vram: ">=80"` - Requires at least 80% of VRAM
474+
- `req_vram: ">50"` - Requires more than 50% of VRAM
475+
- `req_vram: "<=20"` - Requires 20% of VRAM or less
476+
- `req_vram: "<50"` - Requires less than 50% of VRAM
442477

443478
## 7. Private Container Registry Integration
444479

@@ -629,9 +664,17 @@ attributes:
629664
region: us-east
630665
```
631666

667+
You can also specify multiple regions using a semicolon-separated list:
668+
669+
```yaml
670+
attributes:
671+
region: us-east;ap-south;eu-west
672+
```
673+
632674
This is particularly useful when you need to:
633675
- Minimize latency for users in specific geographic areas
634676
- Ensure your application runs in a specific region
677+
- Deploy your workload across multiple regions for redundancy
635678

636679
<Callout type="info">
637680
The region must match one of Spheron's [supported region codes](/rent-gpu/supports#supported-regions). If not specified, your application can be deployed in any available region.
@@ -645,10 +688,18 @@ attributes:
645688
exclude_region: us-east
646689
```
647690

691+
You can also exclude multiple regions using a semicolon-separated list:
692+
693+
```yaml
694+
attributes:
695+
exclude_region: us-east;ap-south;eu-west
696+
```
697+
648698
This is useful when you:
649699
- Want to exclude a specific region from deployment
650700
- Need to ensure your application does not run in a specific region
651701
- Are testing region-specific functionality
702+
- Have compliance requirements that prohibit deployment in certain regions
652703

653704
#### 3. Provider Selection
654705
The `desired_provider` attribute lets you specify a particular provider using their blockchain address:
@@ -658,13 +709,21 @@ attributes:
658709
desired_provider: "0x1234...5678" # Replace with actual provider address
659710
```
660711

712+
You can also specify multiple providers as a semicolon-separated list:
713+
714+
```yaml
715+
attributes:
716+
desired_provider: "0x1234...5678;0xabcd...1234;0xefgh...5678" # Multiple provider addresses
717+
```
718+
661719
This is helpful when you:
662720
- Have had good experiences with a specific provider
663721
- Want to maintain consistency across deployments
664722
- Need specific hardware or capabilities that a provider offers
723+
- Want to distribute your workload across multiple preferred providers
665724

666725
<Callout type="info">
667-
This works in both `provider` and `fizz` modes. In `fizz` mode, it will select fizz nodes that are connected to your chosen provider.
726+
This works in both `provider` and `fizz` modes. In `fizz` mode, it will select fizz nodes that are connected to your chosen provider(s).
668727
</Callout>
669728

670729
#### 3. Fizz Node Selection
@@ -675,10 +734,18 @@ attributes:
675734
desired_fizz: "0xabcd...ef12" # Replace with actual fizz node address
676735
```
677736

737+
Similar to provider selection, you can specify multiple fizz nodes as a semicolon-separated list:
738+
739+
```yaml
740+
attributes:
741+
desired_fizz: "0xabcd...ef12;0x5678...90ab;0xcdef...3456" # Multiple fizz node addresses
742+
```
743+
678744
This is useful when you:
679-
- Want to deploy to a specific node you trust
680-
- Need to maintain application state on a particular node
745+
- Want to deploy to specific nodes you trust
746+
- Need to maintain application state on particular nodes
681747
- Are testing node-specific functionality
748+
- Want to distribute your workload across multiple preferred fizz nodes
682749

683750
#### 4. Bandwidth Selection
684751
<Callout type="info">
@@ -707,6 +774,7 @@ profiles:
707774
region: us-east # Geographic region
708775
desired_provider: "0x1234...5678" # Specific provider
709776
desired_fizz: "0xabcd...ef12" # Specific fizz node
777+
bandwidth: 100mbps # Minimum bandwidth
710778
pricing:
711779
web:
712780
token: uSPON # uSPON is the only supported token for Spheron deployments
@@ -776,3 +844,62 @@ Mac deployments are particularly beneficial for:
776844
<Callout type="info">
777845
**Note:** The availability of specific Mac models depends on what's currently available in the Spheron network. Please check the supported models before configuring your deployment.
778846
</Callout>
847+
848+
## 13. GPU VRAM Minimum Requirements
849+
850+
<Callout type="warning">
851+
**Important:** This feature is only applicable for fizz mode deployments and not for provider deployments.
852+
</Callout>
853+
854+
When deploying GPU workloads to fizz nodes, you can specify minimum VRAM (Video RAM) requirements to ensure you get nodes with sufficient available memory for your application. This helps maximize your workload efficiency and prevents deployment to nodes with insufficient VRAM.
855+
856+
### Configuring VRAM Requirements
857+
858+
You can specify the minimum VRAM requirement using the `req_vram` attribute in your GPU configuration. Here's an example:
859+
860+
```yaml
861+
profiles:
862+
compute:
863+
gpu-intensive:
864+
resources:
865+
cpu:
866+
units: 4.0
867+
memory:
868+
size: 8Gi
869+
storage:
870+
size: 20Gi
871+
gpu:
872+
units: 1
873+
attributes:
874+
vendor:
875+
nvidia:
876+
- model: rtx3090
877+
req_vram: ">=80"
878+
```
879+
880+
### Using Comparison Operators
881+
882+
The `req_vram` attribute accepts a string value with a comparison operator followed by the required VRAM amount in percentage. The supported comparison operators are:
883+
884+
- `>=` - Greater than or equal to
885+
- `>` - Greater than
886+
- `<=` - Less than or equal to
887+
- `<` - Less than
888+
889+
Examples:
890+
- `req_vram: ">=80"` - Requires at least 80% of VRAM
891+
- `req_vram: ">50"` - Requires more than 50% of VRAM
892+
- `req_vram: "<=20"` - Requires 20% of VRAM or less
893+
- `req_vram: "<50"` - Requires less than 50% of VRAM
894+
895+
### Benefits
896+
897+
Specifying VRAM requirements provides several advantages:
898+
899+
1. **Resource Optimization**: Ensures your application gets the GPU memory it needs to run efficiently.
900+
2. **Deployment Reliability**: Prevents your workload from running on underpowered nodes that might crash or perform poorly.
901+
3. **Cost Efficiency**: Helps you match your workload to appropriate resources without overprovisioning.
902+
903+
<Callout type="info">
904+
**Note:** When using the `req_vram` attribute, make sure the value you specify is between 0% and 100% of the GPU's total VRAM. For example, don't request more than 100% of the VRAM or less than 0%.
905+
</Callout>

0 commit comments

Comments
 (0)