Sobroinc Claude commited on
Commit
0fbe1a9
·
1 Parent(s): 60a3775

Fix runtime error: Use requirements-full.txt for complete dependencies

Browse files

🐛 Fixed Runtime Error:
- Changed Dockerfile to use requirements-full.txt instead of requirements.txt
- requirements-full.txt includes all ML dependencies: torch, transformers, etc.
- Now main_full.py can import torch and other ML libraries successfully
- Added main_vercel.py to COPY commands for completeness

🚀 What this enables:
- Full JuriBERT and CamemBERT functionality
- Real AI-powered legal text analysis (not mock data)
- Named Entity Recognition, Document Classification, Q&A
- Complete French legal document processing

The error was:
- Dockerfile used requirements.txt (minimal deps)
- main_full.py needed torch, transformers (ML deps)
- requirements-full.txt had all deps but wasn't used

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +4 -3
Dockerfile CHANGED
@@ -13,8 +13,8 @@ RUN apt-get update && apt-get install -y \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Copy requirements and install Python dependencies
16
- COPY requirements.txt .
17
- RUN pip install --no-cache-dir -r requirements.txt
18
 
19
  # Download required NLTK data
20
  RUN python -m nltk.downloader -d /usr/local/share/nltk_data punkt stopwords
@@ -27,6 +27,7 @@ COPY --chown=user:user app/ ./app/
27
  COPY --chown=user:user main.py .
28
  COPY --chown=user:user main_simple.py .
29
  COPY --chown=user:user main_full.py .
 
30
 
31
  # Switch to user
32
  USER user
@@ -39,5 +40,5 @@ ENV PYTHONUNBUFFERED=1
39
  # Expose port
40
  EXPOSE 7860
41
 
42
- # Run the application (using full version with on-demand loading)
43
  CMD ["uvicorn", "main_full:app", "--host", "0.0.0.0", "--port", "7860"]
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
  # Copy requirements and install Python dependencies
16
+ COPY requirements-full.txt .
17
+ RUN pip install --no-cache-dir -r requirements-full.txt
18
 
19
  # Download required NLTK data
20
  RUN python -m nltk.downloader -d /usr/local/share/nltk_data punkt stopwords
 
27
  COPY --chown=user:user main.py .
28
  COPY --chown=user:user main_simple.py .
29
  COPY --chown=user:user main_full.py .
30
+ COPY --chown=user:user main_vercel.py .
31
 
32
  # Switch to user
33
  USER user
 
40
  # Expose port
41
  EXPOSE 7860
42
 
43
+ # Run the application (using full version with all ML capabilities)
44
  CMD ["uvicorn", "main_full:app", "--host", "0.0.0.0", "--port", "7860"]