From 82c300b417561147346acd47fd4e4caa612e613f Mon Sep 17 00:00:00 2001 From: samiabat Date: Mon, 24 Mar 2025 11:44:32 +0300 Subject: [PATCH] fix the dockerfile issue --- Dockerfile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6dbc7238..5cc33cac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -97,7 +97,7 @@ WORKDIR /app/GPT-SoVITS # Set environment variables ENV DEBIAN_FRONTEND=noninteractive -ENV PATH="/usr/local/bin:/opt/conda/bin:${PATH}" +ENV PATH="/opt/conda/bin:${PATH}" # Install basic dependencies including git-lfs RUN apt-get update && apt-get install -y \ @@ -115,18 +115,22 @@ RUN wget https://repo.anaconda.com/miniconda/Miniconda3-py39_23.11.0-2-Linux-x86 && bash miniconda.sh -b -p /opt/conda \ && rm miniconda.sh +# Use Conda's shell properly +SHELL ["/opt/conda/bin/conda", "run", "-n", "base", "/bin/bash", "-c"] + # Copy the current directory contents (GPT-SoVITS) into the container COPY . . -# Ensure LFS files are pulled (if repository is cloned here; optional) -# RUN git lfs pull # Uncomment if you clone the repo inside the container instead of using COPY +# Ensure LFS files are pulled +RUN git lfs pull # Install Conda dependencies RUN conda install -y -q -c pytorch -c nvidia cudatoolkit \ && conda install -y -q -c conda-forge gcc gxx ffmpeg cmake -# Install Python requirements -RUN pip install -r requirements.txt +# Upgrade pip and install Python requirements +RUN pip install --upgrade pip \ + && pip install -r requirements.txt # Install additional Python packages RUN pip install ipykernel @@ -138,4 +142,4 @@ RUN sed -i '10s/False/True/' config.py EXPOSE 5000 # Set entrypoint to launch WebUI -CMD ["python", "api.py"] \ No newline at end of file +CMD ["python", "api.py"]