Skip to content

Latest commit

 

History

History
76 lines (54 loc) · 1.45 KB

prerequisites.md

File metadata and controls

76 lines (54 loc) · 1.45 KB

Prerequisites

System Requirements

  • NVIDIA RTX 4090M GPU
  • Windows 11
  • Python 3.8+

CUDA Setup

  1. Install NVIDIA GPU drivers (Latest Game Ready Driver)

  2. Install CUDA Toolkit 12.1

  3. Install PyTorch with CUDA 12.1 support

    pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

Python Dependencies

Install all required packages:

pip install -r requirements.txt

Required Python Packages

  • fastapi
  • uvicorn
  • python-multipart
  • transformers
  • torch (with CUDA support)
  • Pillow
  • accelerate
  • typing-extensions

Verify Installation

  1. Test CUDA Setup:
python test_pytorch-cuda.py
  1. Start the FastAPI server:
uvicorn app:app --host 0.0.0.0 --port 8000 --reload
  1. Check API Health:
curl http://localhost:8000/health

Troubleshooting

  1. If CUDA is not detected:

    • Verify NVIDIA drivers: nvidia-smi
    • Check CUDA: nvcc --version
    • Verify PyTorch CUDA: python test_pytorch-cuda.py
  2. If model fails to load:

    • Check available GPU memory
    • Ensure all dependencies are installed
    • Verify Python version compatibility