Yeetek commited on
Commit
74574b0
·
verified ·
1 Parent(s): 6a06d7b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -6,14 +6,16 @@ RUN apt-get update \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  # 2) Set HF & numba cache + runtime ENVs
9
- # Use lowercase model ID to match HF repo
10
  ENV HF_HOME=/tmp/hfcache \
11
  TRANSFORMERS_CACHE=/tmp/hfcache \
12
  SENTENCE_TRANSFORMERS_HOME=/tmp/hfcache \
13
  NUMBA_CACHE_DIR=/tmp/numba_cache \
14
  PIP_NO_CACHE_DIR=1 \
15
  PYTHONUNBUFFERED=1 \
16
- EMBED_MODEL=seznam/simcse-small-e-czech \
 
 
17
  MIN_TOPIC_SIZE=10 \
18
  MAX_DOCS=5000
19
 
@@ -27,14 +29,15 @@ COPY requirements.txt .
27
  RUN pip install --upgrade pip \
28
  && pip install --no-cache-dir -r requirements.txt
29
 
30
- # 5) Pre-download your Czech SBERT into that cache (lowercase ID)
31
  RUN python - <<'PY'
32
  from sentence_transformers import SentenceTransformer
33
  SentenceTransformer(
34
- 'seznam/simcse-small-e-czech',
35
  cache_folder='/tmp/hfcache'
36
  )
37
  PY
 
38
 
39
  # 6) Copy in your app & run
40
  COPY app.py .
 
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  # 2) Set HF & numba cache + runtime ENVs
9
+ # Use correct model ID casing to match HF repo
10
  ENV HF_HOME=/tmp/hfcache \
11
  TRANSFORMERS_CACHE=/tmp/hfcache \
12
  SENTENCE_TRANSFORMERS_HOME=/tmp/hfcache \
13
  NUMBA_CACHE_DIR=/tmp/numba_cache \
14
  PIP_NO_CACHE_DIR=1 \
15
  PYTHONUNBUFFERED=1 \
16
+ EMBED_MODEL=Seznam/simcse-small-e-czech \
17
+ MIN_TOPIC_SIZE=10 \
18
+ MAX_DOCS=5000 \
19
  MIN_TOPIC_SIZE=10 \
20
  MAX_DOCS=5000
21
 
 
29
  RUN pip install --upgrade pip \
30
  && pip install --no-cache-dir -r requirements.txt
31
 
32
+ # 5) Pre-download your Czech SBERT into that cache using correct casing
33
  RUN python - <<'PY'
34
  from sentence_transformers import SentenceTransformer
35
  SentenceTransformer(
36
+ 'Seznam/simcse-small-e-czech',
37
  cache_folder='/tmp/hfcache'
38
  )
39
  PY
40
+ PY
41
 
42
  # 6) Copy in your app & run
43
  COPY app.py .