import docker 필요한 라이브러리 임포트 (https://docker-py.readthedocs.io/en/stable) def add_unit(mem: float) -> str: if mem > 1024**3: mem = round(mem / 1024**3, 2) mem = f"{mem}GiB" elif mem > 1024**2: mem = round(mem / 1024**2, 2) mem = f"{mem}MiB" elif mem > 1024: mem = round(mem / 1024, 2) mem = f"{mem}KiB" else: mem = round(mem, 2) mem = f"{mem}Byte" return mem 데이터 단위를 붙여주기 위한 함수 client = docker.Docke..
import GPUtil 필요한 라이브러리 임포트 (https://github.com/anderskm/gputil) def add_unit(mem: float) -> str: if mem > 1024: mem = round(mem / 1024, 2) mem = f"{mem}GiB" else: mem = round(mem, 2) mem = f"{mem}MiB" return mem 데이터 단위를 붙여주기 위한 함수 for gpu in GPUtil.getGPUs(): gpu_util = f"{gpu.load}%" mem_total = add_unit(gpu.memoryTotal) mem_used = add_unit(gpu.memoryUsed) mem_used_percent = f"{round(gpu.memor..
import os import re import time import socket from urllib.request import urlretrieve from urllib.error import HTTPError, URLError from selenium import webdriver from selenium.common.exceptions import ( ElementClickInterceptedException, NoSuchElementException, ElementNotInteractableException, ) from PIL import Image from pygame import mixer from datetime import date from concurrent.futures import..