Yeetek commited on
Commit
ccc1a91
·
verified ·
1 Parent(s): a98dfce

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -20,22 +20,24 @@ ENV HF_HOME=/tmp/hfcache \
20
  RUN mkdir -p /tmp/hfcache /tmp/numba_cache \
21
  && chmod -R a+rwX /tmp/hfcache /tmp/numba_cache
22
 
23
- # 4) Copy & install Python deps (pin ST to 2.1.0!)
24
  WORKDIR /code
25
  COPY requirements.txt .
26
- # override any ST version in requirements
 
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
31
  RUN python - <<'PY'
32
  from sentence_transformers import SentenceTransformer
33
- SentenceTransformer('Seznam/simcse-small-e-czech',
34
- cache_folder='/tmp/hfcache')
 
 
35
  PY
36
- RUN chmod -R a+rwX /tmp/hfcache
37
 
38
  # 6) Copy in your app & run
39
  COPY app.py .
40
  EXPOSE 7860
41
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
20
  RUN mkdir -p /tmp/hfcache /tmp/numba_cache \
21
  && chmod -R a+rwX /tmp/hfcache /tmp/numba_cache
22
 
23
+ # 4) Copy & install Python deps
24
  WORKDIR /code
25
  COPY requirements.txt .
26
+
27
+ # Install dependencies
28
  RUN pip install --upgrade pip \
29
+ && pip install --no-cache-dir -r requirements.txt
30
 
31
  # 5) Pre-download your Czech SBERT into that cache
32
  RUN python - <<'PY'
33
  from sentence_transformers import SentenceTransformer
34
+ SentenceTransformer(
35
+ 'Seznam/simcse-small-e-czech',
36
+ cache_folder='/tmp/hfcache'
37
+ )
38
  PY
 
39
 
40
  # 6) Copy in your app & run
41
  COPY app.py .
42
  EXPOSE 7860
43
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]