Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +31 -6
Dockerfile
CHANGED
@@ -25,9 +25,27 @@ 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 |
# Create the model directory (relative to /app)
|
32 |
RUN mkdir -p /app/models/xtts_v2
|
33 |
|
@@ -49,11 +67,18 @@ COPY web /app/web
|
|
49 |
# Copy the application code
|
50 |
COPY local_server_new.py /app/
|
51 |
|
52 |
-
#
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
57 |
|
58 |
# Disable numba caching
|
59 |
ENV NUMBA_DISABLE_CACHE=1
|
|
|
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 |
+
|
34 |
+
# Set a generic architecture flag
|
35 |
+
ENV BLIS_ARCH="generic"
|
36 |
+
|
37 |
+
# Try to agree to the Coqui TTS license via environment variable
|
38 |
+
ENV COQUI_TTS_AGREED=1
|
39 |
+
|
40 |
+
# Install Coqui TTS requirements (within the TTS directory)
|
41 |
+
RUN . /app/venv/bin/activate && pip install -r requirements.txt --timeout=300
|
42 |
+
|
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 |
+
|
49 |
# Create the model directory (relative to /app)
|
50 |
RUN mkdir -p /app/models/xtts_v2
|
51 |
|
|
|
67 |
# Copy the application code
|
68 |
COPY local_server_new.py /app/
|
69 |
|
70 |
+
# Create a minimal requirements file for the web app in /app/
|
71 |
+
RUN echo "fastapi==0.109.2" > /app/requirements_web.txt && \
|
72 |
+
echo "uvicorn==0.34.0" >> /app/requirements_web.txt && \
|
73 |
+
echo "torch==2.1.0" >> /app/requirements_web.txt && \
|
74 |
+
echo "torchaudio==2.1.0" >> /app/requirements_web.txt && \
|
75 |
+
echo "transformers==4.35.2" >> /app/requirements_web.txt && \
|
76 |
+
echo "unidecode>=1.3.8" >> /app/requirements_web.txt && \
|
77 |
+
echo "librosa" >> /app/requirements_web.txt && \
|
78 |
+
echo "blis==0.2.4" >> /app/requirements_web.txt # Try pinning blis here
|
79 |
+
|
80 |
+
# Install the minimal web app dependencies
|
81 |
+
RUN . /app/venv/bin/activate && pip install -r /app/requirements_web.txt --no-cache-dir --timeout=600
|
82 |
|
83 |
# Disable numba caching
|
84 |
ENV NUMBA_DISABLE_CACHE=1
|