Juslin commited on
Commit
026fa44
Β·
verified Β·
1 Parent(s): ccc09d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -1
Dockerfile CHANGED
@@ -1,9 +1,11 @@
1
- FROM python:3.12-slim
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