mgbam commited on
Commit
ee1cbf3
·
verified ·
1 Parent(s): 0264796

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +23 -29
requirements.txt CHANGED
@@ -1,34 +1,28 @@
1
- # Web frameworks & servers
2
- fastapi>=0.95.0
3
- uvicorn>=0.22.0
4
 
5
- # HTTP clients & GraphQL
6
- httpx>=0.27.0
7
- gql[all]>=3.5
8
 
9
- # LLM & AI
10
- openai>=0.27.0
11
- google-generativeai>=0.5.0
 
 
 
12
 
13
- # Data & parsing
14
- pydantic>=1.10
15
- python-dotenv>=1.0.0
16
- pandas>=2.0
17
- feedparser>=6.0
18
- xmltodict>=0.13.0
19
- requests>=2.28.1
20
- PyYAML>=6.0
21
- schedule>=1.2.0
22
 
23
- # Visualization & export
24
- plotly>=5.15
25
- fpdf>=1.7
26
- pyvis>=0.3.1
27
- streamlit<2.0,>=1.25.0
28
- streamlit-agraph>=0.0.45
29
- jinja2>=3.0.0
30
 
31
- # NLP core
32
- spacy==3.4.4 # compatible with scispacy en_core_sci_sm v0.5.x
33
- scispacy>=0.5.1
34
- en-core-sci-sm @ https://s3-us-west-2.amazonaws.com/ai2-s2-scispacy/releases/v0.5.1/en_core_sci_sm-0.5.1.tar.gz
 
 
 
 
 
 
1
+ # Base image with Python 3.10
2
+ FROM python:3.10-slim
 
3
 
4
+ WORKDIR /app
 
 
5
 
6
+ # Install system dependencies
7
+ RUN apt-get update && \
8
+ apt-get install -y --no-install-recommends \
9
+ build-essential \
10
+ gcc \
11
+ && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Copy requirements first for better caching
14
+ COPY requirements.txt .
 
 
 
 
 
 
 
15
 
16
+ # Install Python dependencies
17
+ RUN pip install --upgrade pip && \
18
+ pip install --no-cache-dir -r requirements.txt
 
 
 
 
19
 
20
+ # Copy application files
21
+ COPY . .
22
+
23
+ # Set up non-root user
24
+ RUN useradd -m appuser && chown -R appuser:appuser /app
25
+ USER appuser
26
+
27
+ # Run FastAPI with Uvicorn (Hugging Face Spaces expects port 7860)
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]