Google Colab提供最多12小時連線的Jupyter Notebook開發環境,其2018年底層的虛擬機實測規格如下: CPU: Intel(R) Xeon(R) TwinCore @ 2.20GHz x 2 Memory: 13GB Drive: 347GB GPU: Tesla K80 with 4992 cores at 556MHz + 11GB Memory OS: Ubuntu 18.04.1 LTS Time Limit: 12 hours 規格實測的python指令如下: # https://stackoverflow.com/questions/48750199/google-colaboratory-misleading-information-about-its-gpu-only-5-ram-available # memory footprint support libraries/code !ln -sf /opt/bin/nvidia-smi /usr/bin/nvidia-smi !pip install gputil !pip install psutil !pip install humanize import psutil import humanize import os import GPUtil as GPU GPUs = GPU.getGPUs() # XXX: only one GPU on Colab and isn? guaranteed gpu = GPUs[0] def printm(): process = psutil.Process(os.getpid()) print("Gen RAM Free: " + humanize.naturalsize( psutil.virtual_memory().available ), " | Proc size: " + humanize.naturalsize( process.memory_info().rss)) print("GPU RAM Free: {0:.0f}MB | Used: {1:.0f}MB | Util {2:3.0f}% | Total {3:.0f}MB".format(gpu.memoryFree, gpu.memoryUsed, gpu.memoryUtil*100, gpu.memoryTotal)) printm() !df !cat /etc/issue !nvidia-smi !nvidia-smi -L !cat /proc/cpuinfo !cat /proc/meminfo
2018年11月28日 星期三
Virtual Machine Spec for Google Colab Environment
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言