From f174a61aee420ad123ac86d4ebfa42a2facfff5f Mon Sep 17 00:00:00 2001 From: David Kirchner Date: Tue, 11 Jun 2024 09:28:55 -0700 Subject: [PATCH 1/3] Reorder dockerfile to avoid rebuilding modules on all code changes --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e10d867..2eaeea4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,11 @@ RUN apt-get update && apt-get upgrade -y \ && ln -s /usr/bin/python3 /usr/bin/python WORKDIR /app -COPY . . ENV CUDA_DOCKER_ARCH=all +COPY system/requirements/requirements_docker.txt system/requirements/requirements_docker.txt RUN pip install --no-cache-dir --no-deps -r system/requirements/requirements_docker.txt && \ pip install --no-cache-dir deepspeed +COPY . . EXPOSE 7851 7852 RUN chmod +x launch.sh From 663e267d4c419959245e4f69e47b889a571bffe6 Mon Sep 17 00:00:00 2001 From: David Kirchner Date: Tue, 11 Jun 2024 09:36:22 -0700 Subject: [PATCH 2/3] Allow user to specify a docker image using compose This makes it easier to test local changes. Usage is basically: $ docker build -t whatever:latest . $ IMAGE=whatever:latest docker compose up -d --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 469b1d3..7861075 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.8' services: alltalk-tts: - image: alltalk:v1-9c + image: ${IMAGE:-alltalk:v1-9c} restart: unless-stopped ports: - "7851:7851" From 24a0a457a1db295f0d59327457a26fd5c0a501ff Mon Sep 17 00:00:00 2001 From: David Kirchner Date: Tue, 11 Jun 2024 10:30:24 -0700 Subject: [PATCH 3/3] Add a health check to docker compose (monitor with docker ps) --- docker-compose.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7861075..f2c9f74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,6 +12,12 @@ services: - ./voices:/app/voices/ - ./finetune/put-voice-samples-in-here:/app/finetune/put-voice-samples-in-here - ./dockerconfig.json:/app/confignew.json + healthcheck: + test: ["CMD", "wget", "-qO-", "http://localhost:7851/api/ready"] + interval: 1m30s + timeout: 30s + retries: 5 + start_period: 30s deploy: resources: reservations: