mirror of https://github.com/skygpu/skynet.git
Disable torch import on cuda-less runs
parent
a9c237b538
commit
a656be62b6
|
@ -1,4 +1,6 @@
|
||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
|
import importlib.util
|
||||||
|
torch_enabled = importlib.util.find_spec('torch') != None
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
@ -10,8 +12,10 @@ import trio
|
||||||
import click
|
import click
|
||||||
import trio_asyncio
|
import trio_asyncio
|
||||||
|
|
||||||
from . import utils
|
if torch_enabled:
|
||||||
from .dgpu import open_dgpu_node
|
from . import utils
|
||||||
|
from .dgpu import open_dgpu_node
|
||||||
|
|
||||||
from .brain import run_skynet
|
from .brain import run_skynet
|
||||||
from .constants import ALGOS
|
from .constants import ALGOS
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue