Developers
menu
menu

Disks

A disk is a storage unit, storing a collection of files. It is somewhat similar to what other storage services sometimes call buckets or containers.

The main possible actions on disks are:

  • create a disk
  • delete a disk
  • lock a disk, preventing you from deleting it without unlocking it
  • unlock a disk
  • add files to a disk
  • download files from a disk

They are used for two purposes in Qarnot's computing API: for storing input data for your tasks, and for storing result data generated by your tasks.

Resources

Every task can have zero, one, or several resource disks.

The most usual case is to have one disk in which you upload all the data needed by the computation (e.g: python files and input data, or blender file and textures, …).

However, there are cases where you don't need resources. For instance, some computing nodes fetching work and uploading results to one of you servers don't really need a resource disk if your application is packaged as a Docker image available on the Docker Hub.

Another possibility is to have a list of several disks as resources. This will behave the same way a union filesystem (like overlayfs) would, with all files from all disks being a resource to your task. If two disks contain files with the same name, the file from the disk appearing last in the list will override the other.

In any case, the task's resources will be made available to your program in the $TASK_PATH directory (see environment for further details).

Results

Every task has a result disk that is automatically created when you submit it. It is used to retrieve the results of your task (e.g: images rendered by Blender, or any other output file that you need). Just have your program write those results in $TASK_PATH when it has finished (see environment for further details), and they will be automatically put in the result disk. You can then download the content of this disk from the API.

NOTE: resources and results are two use cases for disks. Still, there is only one kind of objects: disks. You can very well use the result disk of some task as a resource for a subsequent task.

Next steps

  • Learn how to select and use the right profile.