inference-job hack (see if we can run without 'svc' command)

This commit is contained in:
Brandon Thomas committed 2023-04-26 01:31:02 -07:00
1 parent 44586c4cee
commit 8eed406fbd
2 files changed
+12 -10

No files matched your search

@@ -3,10 +3,11 @@
# NB: For my crapy internet connection
BUCKET_TIMEOUT_SECONDS=6000
SO_VITS_SVC_INFERENCE_ROOT_DIRECTORY="/models/voice_conversion/so-vits-svc"
#SO_VITS_SVC_INFERENCE_ROOT_DIRECTORY="/models/voice_conversion/so-vits-svc"
SO_VITS_SVC_INFERENCE_ROOT_DIRECTORY="/models/voice_conversion/so-vits-svc/src/so_vits_svc_fork"
#SO_VITS_SVC_INFERENCE_MAYBE_VENV_COMMAND="source python/bin/activate"
#SO_VITS_SVC_INFERENCE_MAYBE_DOCKER_IMAGE="8acacf30bb2e"
SO_VITS_SVC_INFERENCE_MAYBE_DOCKER_IMAGE="88ff860dd428"
#SO_VITS_SVC_INFERENCE_MAYBE_DOCKER_IMAGE="88ff860dd428"
SO_VITS_SVC_INFERENCE_MAYBE_DOCKER_IMAGE="7818ae323c2b"
## Old docker image
#TACOTRON2_VOCODES_DOCKER_IMAGE_SHA=1ba08f70f2ba
@@ -13,7 +13,7 @@ pub struct SoVitsSvcInferenceCommand {
so_vits_svc_root_code_directory: PathBuf,
/// The name of the check/process script, eg. `export_ts.py`
check_script_name: PathBuf,
inference_script_name: PathBuf,
/// eg. `source python/bin/activate`
maybe_virtual_env_activation_command: Option<String>,
@@ -50,14 +50,14 @@ pub struct InferenceArgs<P: AsRef<Path>> {
impl SoVitsSvcInferenceCommand {
pub fn new<P: AsRef<Path>>(
so_vits_svc_root_code_directory: P,
check_script_name: P,
inference_script_name: P,
//maybe_override_python_interpreter: Option<&str>,
maybe_virtual_env_activation_command: Option<&str>,
maybe_docker_options: Option<DockerOptions>,
) -> Self {
Self {
so_vits_svc_root_code_directory: so_vits_svc_root_code_directory.as_ref().to_path_buf(),
check_script_name: check_script_name.as_ref().to_path_buf(),
inference_script_name: inference_script_name.as_ref().to_path_buf(),
maybe_virtual_env_activation_command: maybe_virtual_env_activation_command.map(|s| s.to_string()),
//maybe_override_python_interpreter: maybe_override_python_interpreter.map(|s| s.to_string()),
maybe_docker_options,
@@ -69,7 +69,7 @@ impl SoVitsSvcInferenceCommand {
"SO_VITS_SVC_INFERENCE_ROOT_DIRECTORY")?;
// NB: The command is installed (typically as `svc`) rather than called as a python script.
let check_script_name = easyenv::get_env_pathbuf_or_default(
let inference_script_name = easyenv::get_env_pathbuf_or_default(
"SO_VITS_SVC_INFERENCE_COMMAND",
"svc");
@@ -92,7 +92,7 @@ impl SoVitsSvcInferenceCommand {
Ok(Self {
so_vits_svc_root_code_directory,
check_script_name,
inference_script_name,
maybe_virtual_env_activation_command,
//maybe_override_python_interpreter,
maybe_docker_options,
@@ -116,8 +116,9 @@ impl SoVitsSvcInferenceCommand {
// NB: We can't use `onnx` for model integrity checking (that might take long anyway), so
// we'll just run inference instead. That's flexible and works.
command.push_str(" && ");
command.push_str(&path_to_string(&self.check_script_name));
command.push_str(" infer ");
//command.push_str(&path_to_string(&self.inference_script_name));
//command.push_str(" infer ");
command.push_str(" python3 fakeyou_infer.py ");
// ===== Begin Python Args =====