Skip to content

Commit dd42033

Browse files
committed
ensuring we have env variables
1 parent 061bd1b commit dd42033

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

rvc/server.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,19 @@ def process_rvc():
252252

253253
logger.info(f"Model files found: model={model_path}, index={index_path}")
254254

255+
# Set the index_root environment variable if not already set
256+
if not os.getenv("index_root"):
257+
os.environ["index_root"] = "/app/logs"
258+
logger.info(f"Setting index_root environment variable to: /app/logs")
259+
260+
if not os.getenv("weight_root"):
261+
os.environ["weight_root"] = "/app/weights"
262+
logger.info(f"Setting weight_root environment variable to: /app/weights")
263+
264+
if not os.getenv("rmvpe_root"):
265+
os.environ["rmvpe_root"] = "/app/assets/rmvpe"
266+
logger.info(f"Setting rmvpe_root environment variable to: /app/assets/rmvpe")
267+
255268
# Construct RVC command
256269
rvc_command = [
257270
"python", "tools/infer_cli.py",

0 commit comments

Comments
 (0)