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

fixed conflict

Browse files
Files changed (2) hide show
  1. Dockerfile +12 -15
  2. requirements.txt +10 -22
Dockerfile CHANGED
@@ -1,9 +1,7 @@
1
- # Use Python 3.10 slim for best compatibility with HF wheels
2
  FROM python:3.10-slim
3
 
4
  WORKDIR /app
5
 
6
- # System deps (keep minimal)
7
  RUN apt-get update && apt-get install -y \
8
  build-essential \
9
  curl \
@@ -13,6 +11,8 @@ RUN apt-get update && apt-get install -y \
13
  libsm6 \
14
  libxext6 \
15
  cmake \
 
 
16
  && rm -rf /var/lib/apt/lists/* \
17
  && git lfs install
18
 
@@ -20,26 +20,23 @@ RUN apt-get update && apt-get install -y \
20
  COPY requirements.txt /tmp/requirements.txt
21
  COPY src/ ./src/
22
 
23
- # Make pip deterministic:
24
- # 1) upgrade pip/setuptools/wheel
25
- # 2) uninstall any possibly preinstalled HF packages that could cause conflicts
26
- # 3) install pinned requirements in one go
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
- # Print key versions for debugging in build logs
32
  RUN python - <<'PY'
33
- import sys
34
- def v(mod):
35
  try:
36
- import importlib
37
- m = importlib.import_module(mod)
38
- print(mod, getattr(m,'__version__', 'no-version'))
39
  except Exception as e:
40
- print(mod, 'import-failed:', e)
41
- for mod in ("huggingface_hub","transformers","sentence_transformers","datasets","tokenizers","torch"):
42
- v(mod)
43
  PY
44
 
45
  EXPOSE 8501
 
 
1
  FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
 
11
  libsm6 \
12
  libxext6 \
13
  cmake \
14
+ rsync \
15
+ libgl1 \
16
  && rm -rf /var/lib/apt/lists/* \
17
  && git lfs install
18
 
 
20
  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'))
 
38
  except Exception as e:
39
+ print(m, "import-failed:", e)
 
 
40
  PY
41
 
42
  EXPOSE 8501
requirements.txt CHANGED
@@ -1,37 +1,27 @@
1
- # Force rebuild: 2025-11-30T17:05:00
2
- # Latest stable versions with huggingface-hub 1.x compatibility
3
-
4
- # Hugging Face - latest stable (v5-compatible, supports hub 1.x)
5
- sentence-transformers==3.3.1
6
  transformers==4.46.3
7
- torch==2.5.1
8
  tokenizers==0.20.3
9
- huggingface-hub==0.24.6
 
 
10
  datasets==4.3.0
11
 
12
- # Core ML/NLP
13
- hnswlib==0.8.0
14
  numpy==1.26.4
15
  scikit-learn==1.6.0
16
  scipy==1.14.1
 
17
 
18
- # GraphRAG and NLP
19
  networkx==3.4.2
20
  spacy==3.8.2
21
- rank-bm25==0.2.2
22
-
23
- # Wikipedia extraction
24
- wikipedia-api==0.7.1
25
-
26
- # Groq API
27
- groq==0.13.0
28
-
29
- # Data processing
30
  pandas==2.2.3
31
  rdflib==7.1.1
32
  SPARQLWrapper==2.0.0
33
 
34
- # Web interface
35
  streamlit==1.36.0
36
  altair==5.3.0
37
  pydeck==0.9.1
@@ -43,5 +33,3 @@ requests==2.32.5
43
  python-dateutil==2.9.0.post0
44
  pytz==2025.2
45
  PyYAML==6.0.3
46
-
47
- # Supporting libraries (will be auto-installed as dependencies)
 
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
12
  numpy==1.26.4
13
  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
 
33
  python-dateutil==2.9.0.post0
34
  pytz==2025.2
35
  PyYAML==6.0.3