Spaces:
Running
on
Zero
Running
on
Zero
add cudatoolkit
Browse files
app.py
CHANGED
@@ -6,6 +6,24 @@
|
|
6 |
# copies of the Software, and to permit persons to whom the Software is
|
7 |
import spaces
|
8 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
import random
|
10 |
import uuid
|
11 |
import gradio as gr
|
|
|
6 |
# copies of the Software, and to permit persons to whom the Software is
|
7 |
import spaces
|
8 |
import os
|
9 |
+
|
10 |
+
|
11 |
+
import subprocess
|
12 |
+
subprocess.run(['sh', './conda.sh'])
|
13 |
+
|
14 |
+
import sys
|
15 |
+
conda_prefix = os.path.expanduser("~/miniconda3")
|
16 |
+
conda_bin = os.path.join(conda_prefix, "bin")
|
17 |
+
|
18 |
+
# Add Conda's bin directory to your PATH
|
19 |
+
os.environ["PATH"] = conda_bin + os.pathsep + os.environ["PATH"]
|
20 |
+
|
21 |
+
# Activate the base environment (adjust if needed)
|
22 |
+
os.system(f'{conda_bin}/conda init --all')
|
23 |
+
os.system(f'{conda_bin}/conda activate base')
|
24 |
+
os.system(f'{conda_bin}/conda install nvidia/label/cuda-12.4.0::cuda-toolkit')
|
25 |
+
#os.system(f'{conda_bin}/conda install pytorch::pytorch-cuda')
|
26 |
+
|
27 |
import random
|
28 |
import uuid
|
29 |
import gradio as gr
|