hirthickraj2015 commited on
Commit
e01702c
·
1 Parent(s): a2bed33

fixed conflict

Browse files
Files changed (2) hide show
  1. Dockerfile +7 -4
  2. requirements.txt +8 -7
Dockerfile CHANGED
@@ -2,6 +2,7 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
@@ -21,17 +22,19 @@ COPY requirements.txt /tmp/requirements.txt
21
  COPY src/ ./src/
22
 
23
  # Deterministic install:
24
- # - upgrade pip
25
- # - uninstall any conflicting HF packages (no-op if absent)
26
- # - install exactly what's in requirements.txt in a single pip run
27
  RUN python -m pip install --upgrade pip setuptools wheel \
28
  && pip uninstall -y huggingface-hub transformers sentence-transformers tokenizers datasets gradio spaces hf-transfer || true \
29
  && pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
30
 
31
  # DEBUG: print key versions into build log so you can confirm final state
 
32
  RUN python - <<'PY'
33
  import importlib
34
- for m in ("huggingface_hub","transformers","sentence_transformers","datasets","tokenizers","torch"):
 
35
  try:
36
  mm = importlib.import_module(m)
37
  print(m, getattr(mm,'__version__', 'unknown'))
 
2
 
3
  WORKDIR /app
4
 
5
+ # System dependencies
6
  RUN apt-get update && apt-get install -y \
7
  build-essential \
8
  curl \
 
22
  COPY src/ ./src/
23
 
24
  # Deterministic install:
25
+ # - upgrade pip, setuptools, wheel
26
+ # - uninstall any possibly-preinstalled HF packages (no-op if absent)
27
+ # - install everything from requirements.txt in a single pip run
28
  RUN python -m pip install --upgrade pip setuptools wheel \
29
  && pip uninstall -y huggingface-hub transformers sentence-transformers tokenizers datasets gradio spaces hf-transfer || true \
30
  && pip install --no-cache-dir --upgrade -r /tmp/requirements.txt
31
 
32
  # DEBUG: print key versions into build log so you can confirm final state
33
+ # (keep this while debugging; remove later if you want smaller image)
34
  RUN python - <<'PY'
35
  import importlib
36
+ mods = ("huggingface_hub","transformers","sentence_transformers","datasets","tokenizers","torch")
37
+ for m in mods:
38
  try:
39
  mm = importlib.import_module(m)
40
  print(m, getattr(mm,'__version__', 'unknown'))
requirements.txt CHANGED
@@ -1,11 +1,9 @@
1
- # HF / transformers 4.x stack (consistent)
2
- huggingface-hub==0.24.6
3
  transformers==4.46.3
4
  tokenizers==0.20.3
5
  sentence-transformers==3.3.1
6
-
7
- # datasets (choose a 4.x that pip resolver can align with 0.24.x)
8
- datasets==4.3.0
9
 
10
  # Torch + ML libs
11
  torch==2.5.1
@@ -14,14 +12,17 @@ scikit-learn==1.6.0
14
  scipy==1.14.1
15
  hnswlib==0.8.0
16
 
17
- # NLP / Graph / Utilities
18
  networkx==3.4.2
19
  spacy==3.8.2
 
 
 
20
  pandas==2.2.3
21
  rdflib==7.1.1
22
  SPARQLWrapper==2.0.0
23
 
24
- # Web UI
25
  streamlit==1.36.0
26
  altair==5.3.0
27
  pydeck==0.9.1
 
1
+ # Hugging Face / transformers 4.x stack compatible with hf-hub 0.x
2
+ huggingface-hub==0.33.5
3
  transformers==4.46.3
4
  tokenizers==0.20.3
5
  sentence-transformers==3.3.1
6
+ datasets==4.4.1
 
 
7
 
8
  # Torch + ML libs
9
  torch==2.5.1
 
12
  scipy==1.14.1
13
  hnswlib==0.8.0
14
 
15
+ # GraphRAG and NLP
16
  networkx==3.4.2
17
  spacy==3.8.2
18
+ rank-bm25==0.2.2
19
+
20
+ # Data processing
21
  pandas==2.2.3
22
  rdflib==7.1.1
23
  SPARQLWrapper==2.0.0
24
 
25
+ # Web interface
26
  streamlit==1.36.0
27
  altair==5.3.0
28
  pydeck==0.9.1