Spaces:
Running
Running
File size: 2,098 Bytes
b7f710c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# Running Inference Test Script
Instructions to run the `tests/inference_test.sh` script in the `tests` folder on Linux, Windows, and macOS.
## Prerequisites
1. Install Python, PyTorch, Accelerate:
```bash
pip install -r requirements/requirements.txt
```
2. Create virtual environment:
```bash
python -m venv venv
source venv/bin/activate # Linux/macOS
.\venv\Scripts\activate # Windows
```
3. Make script executable (Linux/macOS):
```bash
chmod +x tests/inference_test.sh
```
## Linux
1. Open terminal, go to folder:
```bash
cd tests
```
2. Run script:
```bash
./inference_test.sh
```
3. **Fix issues**:
- Use `bash inference_test.sh` if `./` fails.
- Fix line endings:
```bash
sudo apt install dos2unix
dos2unix inference_test.sh
```
## Windows (using WSL)
1. Install WSL and Ubuntu from Microsoft Store.
2. Install dependencies:
```bash
sudo apt update
sudo apt install python3 python3-pip
pip install -r requirements/requirements.txt
```
3. Go to folder:
```bash
cd ./tests
```
4. Make executable:
```bash
chmod +x inference_test.sh
```
5. Run script:
```bash
./inference_test.sh
```
6. **Fix issues**:
- Fix line endings:
```bash
sudo apt install dos2unix
dos2unix inference_test.sh
```
## macOS
1. Open Terminal, go to folder:
```bash
cd tests
```
2. Install dependencies:
```bash
brew install python
pip install -r requirements/requirements.txt
```
3. Make executable:
```bash
chmod +x inference_test.sh
```
4. Run script:
```bash
./inference_test.sh
```
5. **Fix issues**:
- Fix line endings:
```bash
brew install dos2unix
dos2unix inference_test.sh
```
## 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:
```bash
./inference_test.sh > output.log 2>&1
```
|