Update Dockerfile
Browse files- 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 |
-
#
|
11 |
-
RUN apt-get update && apt-get install -y \
|
12 |
gcc \
|
13 |
-
|
14 |
-
|
15 |
-
&&
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 . .
|