mirror of
https://github.com/vladmandic/automatic
synced 2026-08-31 01:20:59 +02:00
Fix get_runpod_limit
This commit is contained in:
+4
-2
@@ -24,6 +24,8 @@ def get_docker_limit():
|
||||
docker_limit = float(f.read())
|
||||
except Exception:
|
||||
docker_limit = sys.float_info.max
|
||||
if docker_limit == 0:
|
||||
docker_limit = sys.float_info.max
|
||||
return docker_limit
|
||||
|
||||
|
||||
@@ -31,8 +33,8 @@ def get_runpod_limit():
|
||||
global runpod_limit # pylint: disable=global-statement
|
||||
if runpod_limit is not None:
|
||||
return runpod_limit
|
||||
runpod_limit = float(os.environ.get('RUNPOD_MEM_GB', sys.float_info.max))
|
||||
if runpod_limit == 0: # RUNPOD_MEM_GB can be set to 0 for no limit
|
||||
runpod_limit = float(os.environ.get('RUNPOD_MEM_GB', 0)) * 1024 * 1024 * 1024
|
||||
if runpod_limit == 0:
|
||||
runpod_limit = sys.float_info.max
|
||||
return runpod_limit
|
||||
|
||||
|
||||
Reference in New Issue
Block a user