From 5fe85072a2b087a3eec3e9cd530c19a5fd8d2c99 Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Tue, 23 May 2023 00:16:11 -0700 Subject: [PATCH] pack more in docker container, "hacky fix" flag for so-vits-svc --- .../generic_inference/generic_inference_jobs.sql | 4 +++- .../so_vits_svc/so_vits_svc_inference_command.rs | 15 +++++++++++++++ service_gpu.Dockerfile | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/_sql/analytics/generic_inference/generic_inference_jobs.sql b/_sql/analytics/generic_inference/generic_inference_jobs.sql index 58d1c24c20..c0d452a8ca 100644 --- a/_sql/analytics/generic_inference/generic_inference_jobs.sql +++ b/_sql/analytics/generic_inference/generic_inference_jobs.sql @@ -52,9 +52,11 @@ from ( order by id desc limit 5000 ) as t -order by execution_mins desc; +order by assigned_worker desc, first_started_at asc; order by first_started_at asc; +order by execution_mins desc; + order by assigned_worker desc, execution_mins desc; diff --git a/crates/service/job/inference_job/src/job/job_types/vc/so_vits_svc/so_vits_svc_inference_command.rs b/crates/service/job/inference_job/src/job/job_types/vc/so_vits_svc/so_vits_svc_inference_command.rs index 26b5a88e49..92be68eb86 100644 --- a/crates/service/job/inference_job/src/job/job_types/vc/so_vits_svc/so_vits_svc_inference_command.rs +++ b/crates/service/job/inference_job/src/job/job_types/vc/so_vits_svc/so_vits_svc_inference_command.rs @@ -38,6 +38,9 @@ pub struct SoVitsSvcInferenceCommand { /// If the execution should be ended after a certain point. maybe_execution_timeout: Option, + + /// Enable optional "hacky fixes" in the code. + enable_hacky_fix: Option, } #[derive(Clone)] @@ -93,6 +96,7 @@ impl SoVitsSvcInferenceCommand { maybe_huggingface_cache_dir: Option

, maybe_nltk_cache_dir: Option

, maybe_execution_timeout: Option, + enable_hacky_fix: Option, ) -> Self { Self { so_vits_svc_root_code_directory: so_vits_svc_root_code_directory.as_ref().to_path_buf(), @@ -104,6 +108,7 @@ impl SoVitsSvcInferenceCommand { maybe_huggingface_cache_dir: maybe_huggingface_cache_dir.map(|s| s.as_ref().to_path_buf()), maybe_nltk_cache_dir: maybe_nltk_cache_dir.map(|s| s.as_ref().to_path_buf()), maybe_execution_timeout, + enable_hacky_fix, } } @@ -143,6 +148,9 @@ impl SoVitsSvcInferenceCommand { let maybe_nltk_cache_dir = easyenv::get_env_pathbuf_optional("NLTK_DATA"); + let enable_hacky_fix = + easyenv::get_env_bool_optional("SO_VITS_SVC_ENABLE_HACKY_FIX"); + let maybe_execution_timeout = easyenv::get_env_duration_seconds_optional("SO_VITS_SVC_TIMEOUT_SECONDS"); @@ -189,6 +197,7 @@ impl SoVitsSvcInferenceCommand { maybe_huggingface_cache_dir, maybe_nltk_cache_dir, maybe_execution_timeout, + enable_hacky_fix, }) } @@ -269,6 +278,12 @@ impl SoVitsSvcInferenceCommand { command.push_str(" --device "); command.push_str(&path_to_string(device)); + if let Some(enable_hacky_fix) = self.enable_hacky_fix { + command.push_str(" --hacky_fix "); + command.push_str(if enable_hacky_fix { "true" } else { "false" } ); + command.push_str(" "); + } + // NB: Input wav path is not a named arg command.push_str(" "); command.push_str(&path_to_string(args.input_path)); diff --git a/service_gpu.Dockerfile b/service_gpu.Dockerfile index cdc8dabd12..fe04bc3bff 100644 --- a/service_gpu.Dockerfile +++ b/service_gpu.Dockerfile @@ -182,12 +182,14 @@ COPY crates/service/job/inference_job/config/inference-job.production.env . # TODO(bt,2023-04-26): This is only necessary for download-job and inference-job # NB(bt,2023-05-04): Installing lsof, htop, ripgrep, as debugging tools # net-tools: netstat, for debugging process network connections +# psmisc: fuser, for determining which things users have opennetstat, for debugging process network connections RUN apt-get update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y \ ffmpeg \ htop \ less \ libsndfile1 \ lsof \ + psmisc \ net-tools \ ripgrep \ tmux \