ITADN

Docker container not seeing voice samples in "speakers" folder

#92Closedmaxi1134 创建于 2025-02-03
M
maxi1134commented
I tried locating my wav file for the voice under: `~/docker/xtts-server/app/example` `~/docker/xtts-server/speakers` `~/docker-compose/xtts-api-server/example` `~/docker-compose/xtts-api-server/app/example` And none of them seem to work. My docker files look like this: .env: ``` CONTAINER_PORT=8020 HOST_PORT=8020 SPEAKER_FOLDER="xtts-server/app/speakers" ``` Dockerfile: ``` # Use an official NVIDIA base image with CUDA support FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04 # Set label for the docker image description LABEL description="Docker image for xtts-api-server" # Install required packages (avoid cache to reduce image size) RUN apt-get update && \ apt-get install --no-install-recommends -y \ python3-dev portaudio19-dev libportaudio2 libasound2-dev libportaudiocpp0 \ git python3 python3-pip make g++ ffmpeg && \ rm -rf /var/lib/apt/lists/* # Upgrade pip and install virtualenv RUN python3 -m pip install --upgrade pip setuptools wheel ninja virtualenv # Copy the application source code to /app directory and change the workdir to /app # COPY . /app # WORKDIR /app # Install Python dependencies RUN pip install torch torchaudio --index-url https://download.pytorch.org/whl/cu121 RUN pip install deepspeed RUN pip install xtts-api-server # Expose the container ports EXPOSE 8020 # Run xtts_api_server when the container starts CMD ["bash", "-c", "python3 -m xtts_api_server --listen -p 8020 -t 'http://localhost:8020' -sf 'xtts-server/speakers' -o 'xtts-server/output' -mf 'xtts-server/models' --deepspeed"] ``` Docker-compose.yaml file: ``` version: '3.4' services: xttsapiserver: image: daswer123/xtts-api-server env_file: .env build: context: .. dockerfile: ./docker/Dockerfile ports: - "${HOST_PORT:-8020}:${CONTAINER_PORT:-8020}" volumes: - /home/maxi1134/docker/xtts-server:/xtts-server deploy: resources: reservations: devices: - driver: nvidia device_ids: ['all'] capabilities: [GPU] ``` Any help is appreciated!
关闭于 2025-02-03 1 条评论