Spaces:
Sleeping
Sleeping
fix build: downgrade to python 3.11 for pandas compatibility
Browse files- Dockerfile +5 -4
- requirements.txt +16 -23
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
@@ -9,12 +9,13 @@ RUN apt-get update && apt-get install -y \
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
COPY requirements.txt ./
|
| 12 |
-
COPY src/ ./src/
|
| 13 |
|
| 14 |
-
RUN pip3 install -r requirements.txt
|
|
|
|
|
|
|
| 15 |
|
| 16 |
EXPOSE 8501
|
| 17 |
|
| 18 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 19 |
|
| 20 |
-
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
COPY requirements.txt ./
|
|
|
|
| 12 |
|
| 13 |
+
RUN pip3 install --no-cache-dir -r requirements.txt
|
| 14 |
+
|
| 15 |
+
COPY src/ ./src/
|
| 16 |
|
| 17 |
EXPOSE 8501
|
| 18 |
|
| 19 |
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
|
| 20 |
|
| 21 |
+
ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.headless=true"]
|
requirements.txt
CHANGED
|
@@ -1,34 +1,27 @@
|
|
| 1 |
-
# Reddit Research Dashboard Requirements
|
| 2 |
-
# Optimized for HuggingFace Spaces
|
| 3 |
|
| 4 |
# Core Streamlit and UI
|
| 5 |
-
streamlit
|
| 6 |
-
plotly
|
| 7 |
-
streamlit-extras
|
| 8 |
|
| 9 |
-
# Data Processing
|
| 10 |
-
pandas
|
| 11 |
-
numpy
|
| 12 |
-
pyarrow
|
| 13 |
|
| 14 |
# Reddit API
|
| 15 |
-
praw
|
| 16 |
-
|
| 17 |
-
# Database
|
| 18 |
-
# sqlite3 is built-in, no need to install
|
| 19 |
|
| 20 |
# Network Analysis
|
| 21 |
-
networkx
|
| 22 |
-
scipy
|
| 23 |
|
| 24 |
# Utilities
|
| 25 |
-
python-dotenv
|
| 26 |
-
pytz
|
| 27 |
|
| 28 |
# Performance & Caching
|
| 29 |
-
joblib
|
| 30 |
-
lz4
|
| 31 |
-
|
| 32 |
-
# Optional: For enhanced features
|
| 33 |
-
# textblob==0.17.1 # Sentiment analysis
|
| 34 |
-
# wordcloud==1.9.3 # Word cloud generation
|
|
|
|
| 1 |
+
# Reddit Research Dashboard Requirements
|
| 2 |
+
# Optimized for HuggingFace Spaces with Python 3.11
|
| 3 |
|
| 4 |
# Core Streamlit and UI
|
| 5 |
+
streamlit>=1.31.0
|
| 6 |
+
plotly>=5.18.0
|
| 7 |
+
streamlit-extras>=0.3.6
|
| 8 |
|
| 9 |
+
# Data Processing (Python 3.11 compatible)
|
| 10 |
+
pandas>=2.2.0
|
| 11 |
+
numpy>=1.26.0
|
| 12 |
+
pyarrow>=15.0.0
|
| 13 |
|
| 14 |
# Reddit API
|
| 15 |
+
praw>=7.7.1
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
# Network Analysis
|
| 18 |
+
networkx>=3.2.1
|
| 19 |
+
scipy>=1.11.4
|
| 20 |
|
| 21 |
# Utilities
|
| 22 |
+
python-dotenv>=1.0.1
|
| 23 |
+
pytz>=2024.1
|
| 24 |
|
| 25 |
# Performance & Caching
|
| 26 |
+
joblib>=1.3.2
|
| 27 |
+
lz4>=4.3.3
|
|
|
|
|
|
|
|
|
|
|
|