Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -22,13 +22,13 @@ COPY requirements.txt .
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
-
# Pre-download
|
| 26 |
-
RUN python -c "from TTS.api import TTS; TTS('tts_models/multilingual/multi-dataset/xtts_v2')"
|
| 27 |
|
| 28 |
# Copy application
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
-
# Create Streamlit config
|
| 32 |
RUN mkdir -p .streamlit
|
| 33 |
RUN echo '[server]\n\
|
| 34 |
enableXsrfProtection = false\n\
|
|
@@ -39,7 +39,12 @@ port = 7860\n\
|
|
| 39 |
address = "0.0.0.0"\n\
|
| 40 |
\n\
|
| 41 |
[browser]\n\
|
| 42 |
-
gatherUsageStats = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
# Create non-root user
|
| 45 |
RUN useradd -m -u 1000 streamlit && chown -R streamlit:streamlit /app
|
|
|
|
| 22 |
RUN pip install --no-cache-dir --upgrade pip
|
| 23 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 24 |
|
| 25 |
+
# Pre-download the XTTS v2 model to speed up first run
|
| 26 |
+
RUN python -c "from TTS.api import TTS; TTS('tts_models/multilingual/multi-dataset/xtts_v2', progress_bar=False)"
|
| 27 |
|
| 28 |
# Copy application
|
| 29 |
COPY . .
|
| 30 |
|
| 31 |
+
# Create Streamlit config to fix upload issues
|
| 32 |
RUN mkdir -p .streamlit
|
| 33 |
RUN echo '[server]\n\
|
| 34 |
enableXsrfProtection = false\n\
|
|
|
|
| 39 |
address = "0.0.0.0"\n\
|
| 40 |
\n\
|
| 41 |
[browser]\n\
|
| 42 |
+
gatherUsageStats = false\n\
|
| 43 |
+
\n\
|
| 44 |
+
[theme]\n\
|
| 45 |
+
primaryColor = "#667eea"\n\
|
| 46 |
+
backgroundColor = "#FFFFFF"\n\
|
| 47 |
+
secondaryBackgroundColor = "#f0f2f6"' > .streamlit/config.toml
|
| 48 |
|
| 49 |
# Create non-root user
|
| 50 |
RUN useradd -m -u 1000 streamlit && chown -R streamlit:streamlit /app
|