yukee1992 commited on
Commit
67a4f22
·
verified ·
1 Parent(s): c730ae1

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -2
Dockerfile CHANGED
@@ -7,6 +7,8 @@ WORKDIR /app
7
  ENV PYTHONDONTWRITEBYTECODE=1
8
  ENV PYTHONUNBUFFERED=1
9
  ENV MPLCONFIGDIR=/tmp/matplotlib-cache
 
 
10
 
11
  # Create cache directories
12
  RUN mkdir -p /tmp/voices /tmp/output /tmp/matplotlib-cache && \
@@ -19,11 +21,14 @@ RUN apt-get update && apt-get install -y \
19
  libsndfile1 \
20
  && rm -rf /var/lib/apt/lists/*
21
 
 
 
 
22
  # Copy requirements first for better caching
23
  COPY requirements.txt .
24
 
25
- # Install Python dependencies
26
- RUN pip install --no-cache-dir -r requirements.txt
27
 
28
  # Copy application code
29
  COPY app.py .
 
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 && \
 
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 .