Spaces:
Running
Running
Running Inference Test Script
Instructions to run the tests/inference_test.sh script in the tests folder on Linux, Windows, and macOS.
Prerequisites
- Install Python, PyTorch, Accelerate:
pip install -r requirements/requirements.txt - Create virtual environment:
python -m venv venv source venv/bin/activate # Linux/macOS .\venv\Scripts\activate # Windows - Make script executable (Linux/macOS):
chmod +x tests/inference_test.sh
Linux
- Open terminal, go to folder:
cd tests - Run script:
./inference_test.sh - Fix issues:
- Use
bash inference_test.shif./fails. - Fix line endings:
sudo apt install dos2unix dos2unix inference_test.sh
- Use
Windows (using WSL)
- Install WSL and Ubuntu from Microsoft Store.
- Install dependencies:
sudo apt update sudo apt install python3 python3-pip pip install -r requirements/requirements.txt - Go to folder:
cd ./tests - Make executable:
chmod +x inference_test.sh - Run script:
./inference_test.sh - Fix issues:
- Fix line endings:
sudo apt install dos2unix dos2unix inference_test.sh
- Fix line endings:
macOS
- Open Terminal, go to folder:
cd tests - Install dependencies:
brew install python pip install -r requirements/requirements.txt - Make executable:
chmod +x inference_test.sh - Run script:
./inference_test.sh - Fix issues:
- Fix line endings:
brew install dos2unix dos2unix inference_test.sh
- Fix line endings:
Notes
- Ensure GPU support (CUDA for Linux/Windows, MPS for macOS) if needed.
- Check script for extra settings (e.g.,
export CUDA_VISIBLE_DEVICES=0). - Save output:
./inference_test.sh > output.log 2>&1