Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
import torch
|
2 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
3 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
4 |
-
wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh
|
5 |
# Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH
|
6 |
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122}
|
7 |
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True
|
8 |
|
9 |
# For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc
|
10 |
|
11 |
-
bash cuda_install.sh 117 ~/local 1
|
12 |
try:
|
13 |
import detectron2
|
14 |
except:
|
|
|
1 |
import torch
|
2 |
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
3 |
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
4 |
+
os.system('wget https://raw.githubusercontent.com/TimDettmers/bitsandbytes/main/install_cuda.sh')
|
5 |
# Syntax cuda_install CUDA_VERSION INSTALL_PREFIX EXPORT_TO_BASH
|
6 |
# CUDA_VERSION in {110, 111, 112, 113, 114, 115, 116, 117, 118, 120, 121, 122}
|
7 |
# EXPORT_TO_BASH in {0, 1} with 0=False and 1=True
|
8 |
|
9 |
# For example, the following installs CUDA 11.7 to ~/local/cuda-11.7 and exports the path to your .bashrc
|
10 |
|
11 |
+
os.system('bash cuda_install.sh 117 ~/local 1')
|
12 |
try:
|
13 |
import detectron2
|
14 |
except:
|