From 62fd9ce2e5ad2906985fcc383b880cdf66e702f1 Mon Sep 17 00:00:00 2001 From: Demannu Date: Mon, 10 Feb 2025 17:11:57 -0500 Subject: [PATCH] Fix conda docker build error logic --- Dockerfile | 8 ++++---- docker/conda/Dockerfile | 2 +- docker/deepspeed/Dockerfile | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71b83d9..c7d44b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,7 +41,7 @@ COPY docker/conda/build/environment-*.yml environment.yml RUN <&1 ) - if echo $RESULT | grep -izq error ; then + if [ $? -ne 0 ] ; then echo "Failed to install conda dependencies: $RESULT" exit 1 fi @@ -129,9 +129,9 @@ COPY . . # Create script to execute firstrun.py and run it: ############################################################################## RUN echo $'#!/usr/bin/env bash \n\ -source ~/.bashrc \n\ -conda activate alltalk \n\ -python ./system/config/firstrun.py $@' > ./start_firstrun.sh + source ~/.bashrc \n\ + conda activate alltalk \n\ + python ./system/config/firstrun.py $@' > ./start_firstrun.sh RUN chmod +x start_firstrun.sh RUN ./start_firstrun.sh --tts_model $TTS_MODEL diff --git a/docker/conda/Dockerfile b/docker/conda/Dockerfile index 57ff742..c179bbd 100644 --- a/docker/conda/Dockerfile +++ b/docker/conda/Dockerfile @@ -54,7 +54,7 @@ RUN <&1 ) - if echo $RESULT | grep -izq error ; then + if [ $? -ne 0 ] ; then echo "Failed to install conda dependencies: $RESULT" exit 1 fi diff --git a/docker/deepspeed/Dockerfile b/docker/deepspeed/Dockerfile index 05c256c..869cfd5 100644 --- a/docker/deepspeed/Dockerfile +++ b/docker/deepspeed/Dockerfile @@ -40,7 +40,7 @@ COPY build/environment-*.yml environment.yml RUN <&1 ) - if echo $RESULT | grep -izq error ; then + if [ $? -ne 0 ] ; then echo "Failed to install conda dependencies: $RESULT" exit 1 fi