Update requirements.txt
Browse files- requirements.txt +23 -29
requirements.txt
CHANGED
@@ -1,34 +1,28 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
-
uvicorn>=0.22.0
|
4 |
|
5 |
-
|
6 |
-
httpx>=0.27.0
|
7 |
-
gql[all]>=3.5
|
8 |
|
9 |
-
#
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
12 |
|
13 |
-
#
|
14 |
-
|
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 |
-
#
|
24 |
-
|
25 |
-
|
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 |
-
#
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
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"]
|