yukee1992 commited on
Commit
5133677
·
verified ·
1 Parent(s): 44cdbda

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 MPLCONFIGDIR=/tmp/matplotlib-cache
10
- ENV PIP_DEFAULT_TIMEOUT=100
11
- ENV PIP_NO_CACHE_DIR=1
12
 
13
- # Create cache directories
14
- RUN mkdir -p /tmp/voices /tmp/output /tmp/matplotlib-cache && \
15
- chmod 777 /tmp/voices /tmp/output /tmp/matplotlib-cache
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 with timeout and retry
31
- RUN pip install --no-cache-dir --timeout=100 --retries=5 -r requirements.txt
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 .