Update Dockerfile
Browse files- Dockerfile +8 -11
Dockerfile
CHANGED
|
@@ -6,13 +6,13 @@ WORKDIR /app
|
|
| 6 |
# Set environment variables
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
| 9 |
-
ENV
|
| 10 |
-
ENV
|
| 11 |
-
ENV
|
| 12 |
|
| 13 |
-
# Create cache directories
|
| 14 |
-
RUN mkdir -p /tmp/
|
| 15 |
-
chmod 777 /tmp/
|
| 16 |
|
| 17 |
# Install system dependencies
|
| 18 |
RUN apt-get update && apt-get install -y \
|
|
@@ -21,14 +21,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 21 |
libsndfile1 \
|
| 22 |
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
| 24 |
-
# Upgrade pip first
|
| 25 |
-
RUN pip install --upgrade pip
|
| 26 |
-
|
| 27 |
# Copy requirements first for better caching
|
| 28 |
COPY requirements.txt .
|
| 29 |
|
| 30 |
-
# Install Python dependencies
|
| 31 |
-
RUN pip install --no-cache-dir
|
| 32 |
|
| 33 |
# Copy application code
|
| 34 |
COPY app.py .
|
|
|
|
| 6 |
# Set environment variables
|
| 7 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 8 |
ENV PYTHONUNBUFFERED=1
|
| 9 |
+
ENV HF_HOME=/tmp/huggingface
|
| 10 |
+
ENV TORCH_HOME=/tmp/torch
|
| 11 |
+
ENV COQUI_TOS_AGREED=1
|
| 12 |
|
| 13 |
+
# Create cache directories with proper permissions
|
| 14 |
+
RUN mkdir -p /tmp/tts_models /tmp/huggingface /tmp/torch /tmp/voices /tmp/output && \
|
| 15 |
+
chmod 777 /tmp/tts_models /tmp/huggingface /tmp/torch /tmp/voices /tmp/output
|
| 16 |
|
| 17 |
# Install system dependencies
|
| 18 |
RUN apt-get update && apt-get install -y \
|
|
|
|
| 21 |
libsndfile1 \
|
| 22 |
&& rm -rf /var/lib/apt/lists/*
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
# Copy requirements first for better caching
|
| 25 |
COPY requirements.txt .
|
| 26 |
|
| 27 |
+
# Install Python dependencies
|
| 28 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
# Copy application code
|
| 31 |
COPY app.py .
|