Update Dockerfile
Browse files- Dockerfile +11 -1
Dockerfile
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
ENV TRANSFORMERS_CACHE=/app/model_cache
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
|
|
|
|
|
|
|
| 7 |
# System packages
|
| 8 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 9 |
curl \
|
|
@@ -33,6 +35,14 @@ BartTokenizer.from_pretrained('facebook/bart-large-cnn'); \
|
|
| 33 |
BartForConditionalGeneration.from_pretrained('facebook/bart-large-cnn'); \
|
| 34 |
print('β
BART model preloaded successfully.')"
|
| 35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
COPY . .
|
| 37 |
|
| 38 |
EXPOSE 7860
|
|
|
|
| 1 |
+
FROM python:3.13.4
|
| 2 |
|
| 3 |
ENV TRANSFORMERS_CACHE=/app/model_cache
|
| 4 |
ENV PYTHONDONTWRITEBYTECODE=1
|
| 5 |
ENV PYTHONUNBUFFERED=1
|
| 6 |
|
| 7 |
+
RUN rm -rf /app/model_cache && mkdir -p /app/model_cache && chmod -R 777 /app/model_cache
|
| 8 |
+
|
| 9 |
# System packages
|
| 10 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 11 |
curl \
|
|
|
|
| 35 |
BartForConditionalGeneration.from_pretrained('facebook/bart-large-cnn'); \
|
| 36 |
print('β
BART model preloaded successfully.')"
|
| 37 |
|
| 38 |
+
# π Inspect cache
|
| 39 |
+
RUN echo 'π Listing /app:' && ls -al /app && \
|
| 40 |
+
echo 'π Listing /app/hf_cache:' && ls -al /app/hf_cache && \
|
| 41 |
+
echo 'π Model folders:' && find /app/hf_cache -type d
|
| 42 |
+
|
| 43 |
+
RUN echo "π Listing files inside downloaded model:" && \
|
| 44 |
+
find /app/hf_cache -type f | grep 'bart-large-cnn'
|
| 45 |
+
|
| 46 |
COPY . .
|
| 47 |
|
| 48 |
EXPOSE 7860
|