Spaces:
Sleeping
Sleeping
Commit
·
5a8e7c0
1
Parent(s):
553c7f1
Force CPU in Space and set TORCH_CUDA_ARCH_LIST to avoid JIT arch errors
Browse files
app.py
CHANGED
|
@@ -20,6 +20,9 @@ logger = logging.getLogger("sfe-app")
|
|
| 20 |
# -----------------------------------------------------------------------------
|
| 21 |
# Model bootstrap (load once and reuse)
|
| 22 |
# -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
| 23 |
RUNNER: SimpleRunner | None = None
|
| 24 |
|
| 25 |
|
|
|
|
| 20 |
# -----------------------------------------------------------------------------
|
| 21 |
# Model bootstrap (load once and reuse)
|
| 22 |
# -----------------------------------------------------------------------------
|
| 23 |
+
# Force CPU on Spaces and avoid CUDA arch auto-detection errors during JIT
|
| 24 |
+
os.environ.setdefault("CUDA_VISIBLE_DEVICES", "")
|
| 25 |
+
os.environ.setdefault("TORCH_CUDA_ARCH_LIST", "8.0")
|
| 26 |
RUNNER: SimpleRunner | None = None
|
| 27 |
|
| 28 |
|