Update README.md

This commit is contained in:
GreshAnt 2024-03-10 01:10:58 +08:00 committed by GitHub
parent c8e2b745c4
commit a79d2ce7bc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 20 additions and 1 deletions

View File

@ -183,8 +183,27 @@ virtualenv venv
./venv/Scripts/activate.bat
pip install -r requirements.txt
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
```
Then, create a file that named 'test.py'
```test.py
import torch
x = torch.rand(5, 3)
print(x)
print(torch.cuda.is_available())
```
Run the script via and confirm the output looks like this (the first part should have just random numbers, but the last line must read ; if it does not, CUDA is not installed properly)
```terminal
tensor([[0.2141, 0.7808, 0.9298],
[0.3107, 0.8569, 0.9562],
[0.2878, 0.7515, 0.5547],
[0.5007, 0.6904, 0.4136],
[0.2443, 0.4158, 0.4245]])
True
```
If the last word is "True" that means you installed it successfully.
## Docker Image