File size: 1,030 Bytes
29d1fb6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | from __future__ import annotations
import platform
import sys
from pathlib import Path
PROJECT_ROOT = Path(__file__).resolve().parents[1]
SRC_DIR = PROJECT_ROOT / "src"
sys.path.insert(0, str(SRC_DIR))
from hf_processor_practice.utils import print_title
def main() -> None:
print_title("00. Environment Check")
print("Python:", sys.version)
print("Platform:", platform.platform())
try:
import torch
print("torch:", torch.__version__)
print("CUDA available:", torch.cuda.is_available())
except Exception as exc:
print("torch import failed:", repr(exc))
try:
import transformers
print("transformers:", transformers.__version__)
except Exception as exc:
print("transformers import failed:", repr(exc))
try:
import PIL
print("Pillow:", PIL.__version__)
except Exception as exc:
print("Pillow import failed:", repr(exc))
print("\n환경 확인이 끝났습니다.")
if __name__ == "__main__":
main()
|