Skip to content

profile

CLASS DESCRIPTION
Profile

Profile table.

Classes

Profile

Bases: Base

Profile table.

ATTRIBUTE DESCRIPTION
jobs_remote_dir

Remote path of the job folder (only relevant if

TYPE: Mapped[str | None]

name

Profile name.

TYPE: Mapped[str]

pixi_cache_dir

Override for the PIXI_CACHE_DIR variable, which would otherwise default

TYPE: Mapped[str | None]

resource_type

Type of resource (either local, slurm_sudo or slurm_ssh).

TYPE: Mapped[str]

ssh_key_path

Path to the private SSH key of user username (only relevant if

TYPE: Mapped[str | None]

tasks_remote_dir

Remote path of the task folder (only relevant if

TYPE: Mapped[str | None]

username

Username to be impersonated, either via sudo -u or via ssh.

TYPE: Mapped[str | None]

Source code in fractal_server/app/models/v2/profile.py
class Profile(Base):
    """
    Profile table.
    """

    __tablename__ = "profile"

    id: Mapped[int] = mapped_column(primary_key=True)

    resource_id: Mapped[int] = mapped_column(
        ForeignKey("resource.id", ondelete="RESTRICT")
    )

    resource_type: Mapped[str]
    """
    Type of resource (either `local`, `slurm_sudo` or `slurm_ssh`).
    """

    name: Mapped[str] = mapped_column(unique=True)
    """
    Profile name.
    """

    username: Mapped[str | None] = mapped_column(default=lambda: None)
    """
    Username to be impersonated, either via `sudo -u` or via `ssh`.
    """

    ssh_key_path: Mapped[str | None] = mapped_column(default=lambda: None)
    """
    Path to the private SSH key of user `username` (only relevant if
    `resource_type="slurm_ssh"`).
    """

    jobs_remote_dir: Mapped[str | None] = mapped_column(default=lambda: None)
    """
    Remote path of the job folder (only relevant if
    `resource_type="slurm_ssh"`).
    """

    tasks_remote_dir: Mapped[str | None] = mapped_column(default=lambda: None)
    """
    Remote path of the task folder (only relevant if
    `resource_type="slurm_ssh"`).
    """

    pixi_cache_dir: Mapped[str | None] = mapped_column(default=lambda: None)
    """
    Override for the `PIXI_CACHE_DIR` variable, which would otherwise default
    to the `cache` subfolder of `PIXI_HOME` (only relevant if
    `resource_type="slurm_ssh"`)
    """

Attributes

jobs_remote_dir = mapped_column(default=lambda: None) class-attribute instance-attribute

Remote path of the job folder (only relevant if resource_type="slurm_ssh").

name = mapped_column(unique=True) class-attribute instance-attribute

Profile name.

pixi_cache_dir = mapped_column(default=lambda: None) class-attribute instance-attribute

Override for the PIXI_CACHE_DIR variable, which would otherwise default to the cache subfolder of PIXI_HOME (only relevant if resource_type="slurm_ssh")

resource_type instance-attribute

Type of resource (either local, slurm_sudo or slurm_ssh).

ssh_key_path = mapped_column(default=lambda: None) class-attribute instance-attribute

Path to the private SSH key of user username (only relevant if resource_type="slurm_ssh").

tasks_remote_dir = mapped_column(default=lambda: None) class-attribute instance-attribute

Remote path of the task folder (only relevant if resource_type="slurm_ssh").

username = mapped_column(default=lambda: None) class-attribute instance-attribute

Username to be impersonated, either via sudo -u or via ssh.