diff --git a/Dockerfile b/Dockerfile index 58b4b13..e10d867 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,19 @@ -FROM ubuntu:22.04 -ENV HOST 0.0.0.0 -RUN apt-get update && apt-get upgrade -y \ - && apt-get install -y git build-essential portaudio19-dev \ - python3 python3-pip gcc wget \ - && ln -s /usr/bin/python3 /usr/bin/python - -RUN mkdir -p /app && mkdir -p /app/pip_cache -ENV PIP_CACHE_DIR=/app/pip_cache - -WORKDIR /app -COPY . . -RUN pip install --no-cache-dir --no-deps -r system/requirements/requirements_standalone.txt --cache-dir=/app/pip_cache - -EXPOSE 7851 -RUN chmod +x launch.sh +FROM nvidia/cuda:12.1.1-devel-ubuntu22.04 +ENV HOST 0.0.0.0 +RUN apt-get update && apt-get upgrade -y \ + && apt-get install -y git build-essential portaudio19-dev \ + python3 python3-pip gcc wget \ + ocl-icd-opencl-dev opencl-headers clinfo \ + libclblast-dev libopenblas-dev libaio-dev \ + && mkdir -p /etc/OpenCL/vendors && echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd \ + && ln -s /usr/bin/python3 /usr/bin/python + +WORKDIR /app +COPY . . +ENV CUDA_DOCKER_ARCH=all +RUN pip install --no-cache-dir --no-deps -r system/requirements/requirements_docker.txt && \ + pip install --no-cache-dir deepspeed + +EXPOSE 7851 7852 +RUN chmod +x launch.sh ENTRYPOINT ["sh", "-c", "./launch.sh"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 4bb3247..92dacc9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,21 @@ version: '3.8' services: alltalk-tts: - image: erew123/alltalk_tts:cpu + image: alltalk:v1-9c restart: unless-stopped ports: - "7851:7851" + - "7852:7852" volumes: - ./outputs:/app/outputs/ - ./models:/app/models/ - ./voices:/app/voices/ - ./finetune/put-voice-samples-in-here:/app/finetune/put-voice-samples-in-here - ./dockerconfig.json:/app/confignew.json + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [ gpu ] diff --git a/dockerconfig.json b/dockerconfig.json index d1d179d..039a973 100644 --- a/dockerconfig.json +++ b/dockerconfig.json @@ -1,25 +1,25 @@ -{ - "activate": true, - "autoplay": true, - "branding": "AllTalk ", - "narrator_enabled": false, - "deepspeed_activate": true, - "delete_output_wavs": "Disabled", - "ip_address": "127.0.0.1", - "language": "English", - "low_vram": false, - "local_temperature": "0.7", - "local_repetition_penalty": "10.0", - "tts_model_loaded": true, - "tts_model_name": "tts_models/multilingual/multi-dataset/xtts_v2", - "narrator_voice": "female_01.wav", - "output_folder_wav": "extensions/alltalk_tts/outputs/", - "output_folder_wav_standalone": "outputs/", - "port_number": "7851", - "remove_trailing_dots": false, - "show_text": true, - "tts_method_api_local": false, - "tts_method_api_tts": false, - "tts_method_xtts_local": true, - "voice": "female_01.wav" +{ + "activate": true, + "autoplay": true, + "branding": "AllTalk ", + "narrator_enabled": false, + "deepspeed_activate": true, + "delete_output_wavs": "Disabled", + "ip_address": "127.0.0.1", + "language": "English", + "low_vram": false, + "local_temperature": "0.7", + "local_repetition_penalty": "10.0", + "tts_model_loaded": true, + "tts_model_name": "tts_models/multilingual/multi-dataset/xtts_v2", + "narrator_voice": "female_01.wav", + "output_folder_wav": "extensions/alltalk_tts/outputs/", + "output_folder_wav_standalone": "outputs/", + "port_number": "7851", + "remove_trailing_dots": false, + "show_text": true, + "tts_method_api_local": false, + "tts_method_api_tts": false, + "tts_method_xtts_local": true, + "voice": "female_01.wav" } \ No newline at end of file