Marcin-XStudio commited on
Commit
c4a2517
·
1 Parent(s): c0dc76d

try different Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -2
Dockerfile CHANGED
@@ -7,9 +7,22 @@ ENV TRANSFORMERS_CACHE="/app/model_cache/transformers_cache"
7
  ENV HF_HUB_CACHE="/app/model_cache/hf_hub_cache"
8
  ENV HF_DATASETS_CACHE="/app/model_cache/datasets_cache"
9
 
 
 
 
 
 
 
 
 
 
10
  # 2) Installer huggingface_hub + dépendances
11
- RUN pip install --no-cache-dir huggingface_hub \
12
- && pip install --no-cache-dir -r requirements.txt
 
 
 
 
13
 
14
  # 3) Précharger le modèle au build-time
15
  RUN python - <<EOF
 
7
  ENV HF_HUB_CACHE="/app/model_cache/hf_hub_cache"
8
  ENV HF_DATASETS_CACHE="/app/model_cache/datasets_cache"
9
 
10
+ RUN apt-get update && apt-get install -y \
11
+ build-essential \
12
+ git \
13
+ libpoppler-cpp-dev \
14
+ poppler-utils \
15
+ libmagic-dev \
16
+ python3-dev \
17
+ && rm -rf /var/lib/apt/lists/*
18
+
19
  # 2) Installer huggingface_hub + dépendances
20
+ RUN pip install \
21
+ --no-cache-dir \
22
+ torch torchvision \
23
+ --extra-index-url https://download.pytorch.org/whl/cpu
24
+ RUN pip install --no-cache-dir -r requirements.txt
25
+ RUN pip install --no-cache-dir huggingface_hub
26
 
27
  # 3) Précharger le modèle au build-time
28
  RUN python - <<EOF