From ea285ed4db67969dfaa8afd494a74f4b78cc11b7 Mon Sep 17 00:00:00 2001 From: "kevin.zhang" Date: Wed, 8 May 2024 17:13:04 +0800 Subject: [PATCH] chore: Dockerfile start api v3 --- Dockerfile | 5 +---- api_v3.py | 9 +++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 74e282c4..0148729e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,12 +34,9 @@ RUN if [ "$IMAGE_TYPE" != "elite" ]; then \ fi -# Copy the rest of the application -COPY . /workspace - # Copy the rest of the application COPY . /workspace EXPOSE 9871 9872 9873 9874 9880 -CMD ["python", "webui.py"] +CMD ["python", "api_v3.py"] diff --git a/api_v3.py b/api_v3.py index 1ceceb85..d724bb59 100644 --- a/api_v3.py +++ b/api_v3.py @@ -101,6 +101,11 @@ import os import sys import traceback from typing import Generator + +now_dir = os.getcwd() +sys.path.append(now_dir) +sys.path.append("%s/GPT_SoVITS" % (now_dir)) + import argparse import subprocess import wave @@ -118,10 +123,6 @@ from fastapi.responses import StreamingResponse from pydantic import BaseModel from functools import lru_cache -now_dir = os.getcwd() -sys.path.append(now_dir) -sys.path.append("%s/GPT_SoVITS" % (now_dir)) - cut_method_names = get_cut_method_names() parser = argparse.ArgumentParser(description="GPT-SoVITS api")