class_docstr: Creates an instance of a local repo from a local path.
  
  Example:
  
  ```python
  run = client.runs.submit(
      configuration=...,
      repo=LocalRepo.from_dir("."), # Mount the current folder to the run
  )
  ```
class_docstr_tok: ["Creates","an","instance","of","a","local","repo","from","a","local","path",".","Example",":","``","`","python","run","=","client.runs.submit","(","configuration=","...",",","repo=LocalRepo.from_dir","(","``",".","``",")",",","#","Mount","the","current","folder","to","the","run",")","``","`"]
code: def __init__(
      self,
      *,
      repo_id: Optional[str] = None,
      repo_dir: Optional[PathLike] = None,
      repo_data: Optional[LocalRunRepoData] = None,
  ):
      self.repo_dir = repo_dir
  
      if repo_dir is not None:
          repo_data = LocalRunRepoData(repo_dir=str(repo_dir))
      elif repo_data is None:
          raise ValueError("No local repo data provided")
  
      if repo_id is None:
          repo_id = slugify(
              Path(repo_data.repo_dir).name, repo_data.repo_dir
          )
  
      self.repo_id = repo_id
      self.run_repo_data = repo_data
  
imports: import tarfile
  from pathlib import Path
  from typing import BinaryIO, Optional
  from pydantic import BaseModel
  from typing_extensions import Literal
  from dstack._internal.core.models.repos.base import BaseRepoInfo, Repo
  from dstack._internal.utils.hash import get_sha256, slugify
  from dstack._internal.utils.ignore import GitIgnore
  from dstack._internal.utils.path import PathLike
label_desc: Use image node_id 2 to create a new LocalRepo object from inherited base classes: Repo with example: obj = LocalRepo()