Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

2.9 KB
Raw Blame
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0

/** Friendly names for auto-created shell containers. Collisions are fine: `cntr_*` id is the key. */

const WORDS = [
  "otter",
  "falcon",
  "heron",
  "lynx",
  "marten",
  "stoat",
  "raven",
  "magpie",
  "salmon",
  "trout",
  "perch",
  "tortoise",
  "gecko",
  "iguana",
  "axolotl",
  "narwhal",
  "manatee",
  "dolphin",
  "porpoise",
  "octopus",
  "cuttlefish",
  "nautilus",
  "starfish",
  "urchin",
  "anemone",
  "coral",
  "puffin",
  "kestrel",
  "osprey",
  "buzzard",
  "kingfisher",
  "robin",
  "wren",
  "finch",
  "sparrow",
  "thrush",
  "siskin",
  "warbler",
  "tanager",
  "oriole",
  "hare",
  "badger",
  "weasel",
  "ferret",
  "polecat",
  "civet",
  "tapir",
  "okapi",
  "ibex",
  "chamois",
  "alder",
  "aspen",
  "birch",
  "cedar",
  "cypress",
  "elder",
  "elm",
  "fir",
  "ginkgo",
  "hawthorn",
  "hazel",
  "hemlock",
  "holly",
  "juniper",
  "larch",
  "linden",
  "maple",
  "oak",
  "olive",
  "pine",
  "rowan",
  "spruce",
  "sycamore",
  "willow",
  "yew",
  "thistle",
  "fern",
  "moss",
  "ivy",
  "clover",
  "heather",
  "lavender",
  "rosemary",
  "sage",
  "thyme",
  "myrtle",
  "laurel",
  "magnolia",
  "harbor",
  "atoll",
  "lagoon",
  "estuary",
  "fjord",
  "delta",
  "isthmus",
  "mesa",
  "plateau",
  "valley",
  "ridge",
  "summit",
  "glade",
  "meadow",
  "moor",
  "heath",
  "tundra",
  "savanna",
  "prairie",
  "steppe",
  "bayou",
  "marsh",
  "fen",
  "grotto",
  "cavern",
  "canyon",
  "ravine",
  "gorge",
  "knoll",
  "dell",
  "vale",
  "coast",
  "amber",
  "agate",
  "onyx",
  "opal",
  "jade",
  "quartz",
  "obsidian",
  "basalt",
  "granite",
  "marble",
  "slate",
  "flint",
  "lapis",
  "topaz",
  "garnet",
  "pearl",
  "coral",
  "ivory",
  "ebony",
  "copper",
  "cobalt",
  "indigo",
  "saffron",
  "vermilion",
  "ochre",
  "umber",
  "sienna",
  "russet",
  "aurora",
  "comet",
  "ember",
  "frost",
  "gale",
  "harvest",
  "monsoon",
  "nebula",
  "solstice",
  "twilight",
  "zephyr",
  "drizzle",
  "tempest",
  "halcyon",
  "equinox",
  "rainbow",
  "horizon",
  "meridian",
  "zenith",
  "comet",
  "lantern",
  "kettle",
  "compass",
  "anchor",
  "beacon",
  "harbor",
  "voyage",
  "trellis",
  "cottage",
  "thicket",
  "orchard",
  "bramble",
  "haystack",
  "snowfall",
  "campfire",
];

function randomHexSuffix(): string {
  if (
    typeof crypto !== "undefined" &&
    typeof crypto.randomUUID === "function"
  ) {
    return crypto.randomUUID().replace(/-/g, "").slice(0, 4);
  }
  // Math.random is fine here: display suffix, not a token.
  return Math.floor(Math.random() * 0xffff)
    .toString(16)
    .padStart(4, "0");
}

export function pickFriendlyContainerName(): string {
  const word = WORDS[Math.floor(Math.random() * WORDS.length)] ?? "container";
  return `${word}-${randomHexSuffix()}`;
}