Skip to main content

Create your first compute environment

Quick start: create a volume, create your first compute resource (for example a Jupyter notebook with PyTorch on a GPU) and list your volumes and compute resources.

Creating a volume

cgc volume create <name> --size <size> -sc <storage_class>

  • -s - size in GiB of your volume
  • -sc, --storage-class - storage class of your volume

For the created volume to be accessible, it needs to be mounted to a resource.

Output

cgc volume create getting-started -s 10 -sc <storage_class>
Volume getting-started of size 10.0 GB on SSD created. Volume is ReadWriteMany.

List of existing volumes

List all created volumes:

cgc volume list

example:

cgc volume list
name used size type disks type mounted to
--------------- ------ ------ ------------- ------------ ------------
getting-started 7.67M 10Gi ReadWriteMany SSD

Compute create

To create your first compute resource, you need to specify the name and type of entity for the compute resource.

cgc compute create <entity> --name --gpu -gpu-type --cpu --memory --volume

where

  • entity - i.e. nvidia-pytorch
  • -n, --name - name of the compute resource
  • -g, --gpu - quantity of attached GPUs
  • -gt, --gpu-type - type of attached GPU, named as in cgc status (NVIDIA-RTX-A5000 | NVIDIA-A100-SXM4-80GB | NVIDIA-B200) default = NVIDIA-RTX-A5000
  • -c, --cpu - cpu core count
  • -m, --memory - amount of attached RAM in GiB
  • -v, --volume - volume to mount name of volume

example:

cgc compute create -n getting-jupyter -c 2 -m 4 -g 1 -gt NVIDIA-RTX-A5000 -v getting-started nvidia-pytorch

nvidia-pytorch app getting-jupyter creation started!
Volumes to mount: getting-started
Container will be Ready after volumes can be see mounted.
Will be accessible at: https://getting-jupyter.namespace.cgc-waw-01.comtegra.cloud
App token: f660c69776c647eba6d895c312388a0c
To monitor the startup status use list command
Environment variables: JUPYTER_PORT=8888, JUPYTER_TOKEN=f660c69776c647eba6d895c312388a0c

Output provides an accessible URL and generated token. Token can be changed at first login.

List of existing compute resources

If you want to see the list of your existing compute resources, you can use the list command.

cgc compute list

example:

cgc compute list
name type status volumes_mounted cpu ram count gpu-count gpu-label url
--------------- -------------- -------- ----------------- ----- ----- ------- ----------- ---------------- -----------------------------------------------------
getting-jupyter nvidia-pytorch Running getting-started 2 4Gi 1 1 nvidia-rtx-a5000 https://getting-jupyter.namespace.cgc-waw-01.comtegra.cloud

To see Jupyter token add -d flag for more details.