code: def run_interactive(
      job_mode: c.JobMode,
      workdir: Optional[str] = None,
      image_id: Optional[str] = None,
      run_args: Optional[List[str]] = None,
      mount_home: Optional[bool] = None,
      shell: Optional[b.Shell] = None,
      entrypoint: Optional[str] = None,
      entrypoint_args: Optional[List[str]] = None,
      **build_image_kwargs,
  ) -> None:
      """Start a live shell in the terminal, with all dependencies installed and the
      current working directory (and optionally the user's home directory) mounted.
  
      Keyword args:
  
      - job_mode: c.JobMode.
      - image_id: ID of the image to run. Supplying this will skip an image build.
      - run_args: extra arguments to supply to `docker run`.
      - mount_home: if true, mounts the user's $HOME directory into the container
        to `/home/$USERNAME`. If False, nothing.
      - shell: name of the shell to install into the container. Also configures the
        entrypoint if that's not supplied.
      - entrypoint: command to run. Defaults to the executable command for the
        supplied shell.
      - entrypoint_args: extra arguments to supply to the entrypoint.
  
      any extra kwargs supplied are passed through to build_image.
  
      """
      if workdir is None:
          workdir = b.DEFAULT_WORKDIR
  
      if run_args is None:
          run_args = []
  
      if entrypoint_args is None:
          entrypoint_args = []
  
      if mount_home is None:
          mount_home = True
  
      if shell is None:
          # Only set a default shell if we're also mounting the home volume.
          # Otherwise a custom shell won't have access to the user's profile.
          shell = b.default_shell() if mount_home else b.Shell.bash
  
      if entrypoint is None:
          entrypoint = b.SHELL_DICT[shell].executable
  
      interactive_run_args = (
          _interactive_opts(workdir)
          + ["-it", "--entrypoint", entrypoint]
          + _home_mount_cmds(mount_home)
          + run_args
      )
  
      r.run(
          job_mode=job_mode,
          run_args=interactive_run_args,
          script_args=entrypoint_args,
          image_id=image_id,
          shell=shell,
          workdir=workdir,
          **build_image_kwargs,
      )
  
file_path: caliban/caliban/platform/shell.py
imports: import os
  from pathlib import Path
  from typing import List, Optional
  import caliban.config
  import caliban.docker.build
  import caliban.platform.run
label_desc: Use image node_id 3 for calling a global function with example usage: run_interactive(job_mode, workdir, image_id, run_args, mount_home, shell, entrypoint, entrypoint_args) without return types