Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +11 -17
Dockerfile
CHANGED
|
@@ -1,10 +1,10 @@
|
|
| 1 |
-
# Use an official Python runtime as a parent image
|
| 2 |
-
FROM python:3.9-buster
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install build tools and other dependencies
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
build-essential \
|
| 10 |
cmake \
|
|
@@ -13,14 +13,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 13 |
python3-venv \
|
| 14 |
python3-dev \
|
| 15 |
wget \
|
| 16 |
-
git
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
# Initialize and update submodules
|
| 22 |
-
RUN git submodule init
|
| 23 |
-
RUN git submodule update
|
| 24 |
|
| 25 |
# Create a virtual environment
|
| 26 |
RUN python3 -m venv venv
|
|
@@ -28,6 +25,9 @@ RUN python3 -m venv venv
|
|
| 28 |
# Activate the virtual environment
|
| 29 |
RUN . /app/venv/bin/activate
|
| 30 |
|
|
|
|
|
|
|
|
|
|
| 31 |
# Set the working directory to the TTS directory
|
| 32 |
WORKDIR /app/TTS
|
| 33 |
|
|
@@ -43,12 +43,6 @@ RUN . /app/venv/bin/activate && pip install -r requirements.txt --timeout=300
|
|
| 43 |
# Explicitly install the TTS package itself in editable mode
|
| 44 |
RUN . /app/venv/bin/activate && pip install -e . --timeout=300
|
| 45 |
|
| 46 |
-
# Explicitly install numba
|
| 47 |
-
RUN . /app/venv/bin/activate && pip install numba --timeout=300
|
| 48 |
-
|
| 49 |
-
# Try installing a specific version of librosa
|
| 50 |
-
RUN . /app/venv/bin/activate && pip install librosa==0.9.1 --timeout=300
|
| 51 |
-
|
| 52 |
# Change working directory back to /app
|
| 53 |
WORKDIR /app
|
| 54 |
|
|
|
|
| 1 |
+
# Use an official Python runtime as a parent image
|
| 2 |
+
FROM python:3.9-slim-buster
|
| 3 |
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install build tools and other dependencies
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
build-essential \
|
| 10 |
cmake \
|
|
|
|
| 13 |
python3-venv \
|
| 14 |
python3-dev \
|
| 15 |
wget \
|
| 16 |
+
git \
|
| 17 |
+
gcc \
|
| 18 |
+
g++ \
|
| 19 |
+
libffi-dev \
|
| 20 |
+
zlib1g-dev
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
# Create a virtual environment
|
| 23 |
RUN python3 -m venv venv
|
|
|
|
| 25 |
# Activate the virtual environment
|
| 26 |
RUN . /app/venv/bin/activate
|
| 27 |
|
| 28 |
+
# Copy the locally cloned Coqui TTS repository
|
| 29 |
+
COPY TTS /app/TTS
|
| 30 |
+
|
| 31 |
# Set the working directory to the TTS directory
|
| 32 |
WORKDIR /app/TTS
|
| 33 |
|
|
|
|
| 43 |
# Explicitly install the TTS package itself in editable mode
|
| 44 |
RUN . /app/venv/bin/activate && pip install -e . --timeout=300
|
| 45 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
# Change working directory back to /app
|
| 47 |
WORKDIR /app
|
| 48 |
|