Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -1,8 +1,12 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
apt install -y
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
rm -rf /var/lib/apt/lists/*
|
| 7 |
|
| 8 |
WORKDIR /app
|
|
@@ -10,5 +14,8 @@ COPY requirements.txt .
|
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
COPY . .
|
| 12 |
|
|
|
|
|
|
|
|
|
|
| 13 |
ENV PORT=7860
|
| 14 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Download the specific wkhtmltopdf .deb package and install it with its dependencies
|
| 4 |
+
RUN apt-get update && \
|
| 5 |
+
apt-get install -y --no-install-recommends wget && \
|
| 6 |
+
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 7 |
+
apt install -y ./wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 8 |
+
# Clean up downloaded files and apt cache
|
| 9 |
+
rm ./wkhtmltox_0.12.6-1.buster_amd64.deb && \
|
| 10 |
rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
WORKDIR /app
|
|
|
|
| 14 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
COPY . .
|
| 16 |
|
| 17 |
+
# Ensure the temp directory is writable (uncomment if needed)
|
| 18 |
+
# RUN mkdir -p /app/temp && chmod -R 777 /app/temp
|
| 19 |
+
|
| 20 |
ENV PORT=7860
|
| 21 |
CMD ["python", "app.py"]
|