heboya8 commited on
Commit
f3ad87e
·
verified ·
1 Parent(s): b7e4ce5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -6
Dockerfile CHANGED
@@ -7,13 +7,22 @@ WORKDIR /app
7
  # Copy requirements file first to leverage Docker cache
8
  COPY requirements.txt .
9
 
10
- # Install system dependencies and Python packages
11
- RUN apt-get update && apt-get install -y \
12
  gcc \
13
- && rm -rf /var/lib/apt/lists/* \
14
- && pip install --no-cache-dir pip-tools \
15
- && pip-sync requirements.txt \
16
- && pip install --no-cache-dir gradio
 
 
 
 
 
 
 
 
 
17
 
18
  # Copy the rest of the application code
19
  COPY . .
 
7
  # Copy requirements file first to leverage Docker cache
8
  COPY requirements.txt .
9
 
10
+ # Update apt-get with retries and install system dependencies
11
+ RUN apt-get update --fix-missing && apt-get install -y --no-install-recommends \
12
  gcc \
13
+ build-essential \
14
+ libpython3.11-dev \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Update pip and install pip-tools
18
+ RUN pip install --no-cache-dir --upgrade pip \
19
+ && pip install --no-cache-dir pip-tools
20
+
21
+ # Sync dependencies with pip-sync
22
+ RUN pip-sync requirements.txt
23
+
24
+ # Install Gradio
25
+ RUN pip install --no-cache-dir gradio
26
 
27
  # Copy the rest of the application code
28
  COPY . .