FastAI Setup

Details on setting up FASTAI
Author

Benedict Thekkel

Installs

For installing fastai

pip install fastai
!pip list | grep "fastai"
!mamba install -c nvidia fastai
conda install -c nvidia fastai anaconda

For installing fastbook

pip install fastbook
!pip list | grep "fastbook"
import torch
---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
Cell In[7], line 1
----> 1 import torch

ModuleNotFoundError: No module named 'torch'
if torch.cuda.is_available():
    print("GPU is available.")
    num_gpu = torch.cuda.device_count()
    for i in range(num_gpu):
        gpu_name = torch.cuda.get_device_name(i)
        gpu_memory = torch.cuda.get_device_properties(i).total_memory / (1024 ** 3)  # Convert bytes to GB
        print(f"GPU {i}: {gpu_name}, Memory: {gpu_memory:.2f} GB")
else:
    print("GPU is not available.")
Back to top