Update Dockerfile
Browse files- Dockerfile +7 -3
Dockerfile
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
# Dockerfile
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
# IMPORTANT: Install System Dependencies as the root user first.
|
| 5 |
# This step MUST come before switching to the 'user' account.
|
| 6 |
RUN apt-get update && \
|
|
@@ -8,8 +13,8 @@ RUN apt-get update && \
|
|
| 8 |
libreoffice \
|
| 9 |
unoconv \
|
| 10 |
python3-uno \
|
| 11 |
-
# Add 'locales' package if needed for environment stability
|
| 12 |
locales \
|
|
|
|
| 13 |
&& \
|
| 14 |
rm -rf /var/lib/apt/lists/*
|
| 15 |
|
|
@@ -21,8 +26,7 @@ USER user
|
|
| 21 |
# Set working directory for the user
|
| 22 |
WORKDIR /home/user/app
|
| 23 |
|
| 24 |
-
# Install Python dependencies from requirements.txt (
|
| 25 |
-
# Note: Ensure your requirements.txt only contains 'gradio'
|
| 26 |
COPY requirements.txt /home/user/app/
|
| 27 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
|
|
|
|
| 1 |
# Dockerfile
|
| 2 |
FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# --- START CACHE BUSTER ---
|
| 5 |
+
# This command forces the build system to re-run the subsequent installation step.
|
| 6 |
+
RUN echo "Forcing a fresh install of unoconv dependencies."
|
| 7 |
+
# --- END CACHE BUSTER ---
|
| 8 |
+
|
| 9 |
# IMPORTANT: Install System Dependencies as the root user first.
|
| 10 |
# This step MUST come before switching to the 'user' account.
|
| 11 |
RUN apt-get update && \
|
|
|
|
| 13 |
libreoffice \
|
| 14 |
unoconv \
|
| 15 |
python3-uno \
|
|
|
|
| 16 |
locales \
|
| 17 |
+
# Add a dummy package here, if necessary, to break cache again, e.g., 'ca-certificates'
|
| 18 |
&& \
|
| 19 |
rm -rf /var/lib/apt/lists/*
|
| 20 |
|
|
|
|
| 26 |
# Set working directory for the user
|
| 27 |
WORKDIR /home/user/app
|
| 28 |
|
| 29 |
+
# Install Python dependencies from requirements.txt (must only contain 'gradio')
|
|
|
|
| 30 |
COPY requirements.txt /home/user/app/
|
| 31 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 32 |
|