updated dockerfile withh entrypoint

This commit is contained in:
supermomo668 2024-08-03 23:50:20 +00:00
parent 9c822c22db
commit 7b616685d9
7 changed files with 29 additions and 2 deletions

3
.gitignore vendored
View file

@ -1,3 +1,6 @@
# data
data/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

View file

@ -45,3 +45,6 @@ RUN bash -c "source ${CONDA_DIR}/etc/profile.d/conda.sh && conda activate tortoi
# Default command
CMD ["/bin/bash"]
# Default entrypoint
ENTRYPOINT ["python", "tortoise/do_tts.py"]

1
bin/docker-build.sh Normal file
View file

@ -0,0 +1 @@
docker build . -t tts

9
bin/docker-remove.sh Normal file
View file

@ -0,0 +1,9 @@
# optionally: --gpus all
docker run \
-e TORTOISE_MODELS_DIR=/models \
-v ./data/models:/models \
-v ./data/results:/results \
-v ./data/.cache/huggingface:/root/.cache/huggingface \
-v /root:/work \
--name tts-app \
-it tts

8
bin/docker-run.sh Normal file
View file

@ -0,0 +1,8 @@
docker run --gpus all \
-e TORTOISE_MODELS_DIR=/models \
-v ./data/models:/models \
-v ./data/results:/results \
-v ./data/.cache/huggingface:/root/.cache/huggingface \
-v /root:/work \
--name tts-app \
-it tts

2
bin/docker-start.sh Normal file
View file

@ -0,0 +1,2 @@
. bin/docker-build.sh
. bin/docker-run.sh

View file

@ -10,8 +10,9 @@ from utils.audio import load_voices
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--text', type=str, help='Text to speak.', default="The expressiveness of autoregressive transformers is literally nuts! I absolutely adore them.")
parser.add_argument('--voice', type=str, help='Selects the voice to use for generation. See options in voices/ directory (and add your own!) '
'Use the & character to join two voices together. Use a comma to perform inference on multiple voices.', default='random')
parser.add_argument('--voice', type=str, help="""
Selects the voice to use for generation. See options in voices/ directory (and add your own!) '
'Use the & character to join two voices together. Use a comma to perform inference on multiple voices.""", default='random')
parser.add_argument('--preset', type=str, help='Which voice preset to use.', default='fast')
parser.add_argument('--use_deepspeed', type=str, help='Use deepspeed for speed bump.', default=False)
parser.add_argument('--kv_cache', type=bool, help='If you disable this please wait for a long a time to get the output', default=True)