Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -2
Dockerfile
CHANGED
@@ -9,9 +9,13 @@ RUN apt-get update && apt-get install -y \
|
|
9 |
python3-dev \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
-
# Copy requirements first to leverage Docker cache
|
13 |
COPY requirements.txt .
|
14 |
-
|
|
|
|
|
|
|
|
|
15 |
|
16 |
# Copy the rest of the application
|
17 |
COPY . .
|
|
|
9 |
python3-dev \
|
10 |
&& rm -rf /var/lib/apt/lists/*
|
11 |
|
12 |
+
# Copy only requirements first to leverage Docker cache
|
13 |
COPY requirements.txt .
|
14 |
+
|
15 |
+
# Install Python dependencies with optimizations
|
16 |
+
RUN pip install --no-cache-dir pip -U && \
|
17 |
+
pip install --no-cache-dir -r requirements.txt && \
|
18 |
+
pip cache purge
|
19 |
|
20 |
# Copy the rest of the application
|
21 |
COPY . .
|