hanantonio commited on
Commit
be4ab8f
·
verified ·
1 Parent(s): 0f8de1b

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -5
  2. requirements.txt +27 -14
Dockerfile CHANGED
@@ -1,20 +1,31 @@
1
- FROM python:3.13.5-slim
 
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  build-essential \
7
  curl \
8
  git \
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", "--server.enableXsrfProtection=false"]
 
 
1
+ # Use Python 3.10 (compatible with torch 1.11)
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  build-essential \
10
  curl \
11
  git \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Copy requirements and source code
15
+ COPY requirements.txt ./
16
  COPY src/ ./src/
17
 
18
+ # Upgrade pip
19
+ RUN pip install --upgrade pip
20
 
21
+ # Install Python packages
22
+ RUN pip install --no-cache-dir -r requirements.txt
23
+
24
+ # Expose Streamlit port
25
  EXPOSE 8501
26
 
27
+ # Healthcheck (optional but good practice)
28
+ HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
29
 
30
+ # Launch Streamlit
31
+ ENTRYPOINT ["streamlit", "run", "src/app.py", "--server.port=8501", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
requirements.txt CHANGED
@@ -1,17 +1,30 @@
 
1
  streamlit==1.44.0
 
 
2
  pandas==2.2.3
3
- seaborn
4
- matplotlib
5
- plotly
6
- pillow
7
- numpy
8
- wordcloud
9
- fastopic==1.0.1
10
- topmost==1.0.2
11
- torchvision==0.21.0
 
12
  gensim==4.3.3
13
- torch===1.11.0
14
- joblib===1.2.0
15
- scikit-learn==1.6.1
16
- tensorflow==2.20.0
17
- nltk
 
 
 
 
 
 
 
 
 
 
1
+ # Streamlit
2
  streamlit==1.44.0
3
+
4
+ # Data manipulation & visualization
5
  pandas==2.2.3
6
+ numpy==1.25.3
7
+ matplotlib==3.7.3
8
+ seaborn==0.13.2
9
+ plotly==6.3.0
10
+ pillow==11.3.0
11
+ wordcloud==1.9.4
12
+
13
+ # NLP / Topic Modeling
14
+ fastopic==1.0.1 --no-deps
15
+ topmost==1.0.2 --no-deps
16
  gensim==4.3.3
17
+ joblib==1.2.0
18
+ scikit-learn==1.5.2
19
+ nltk==3.8.1
20
+
21
+ # Torch (required by fastopic/topmost)
22
+ torch==1.11.0
23
+ torchvision==0.12.0
24
+
25
+ # TensorFlow
26
+ tensorflow==2.17.1
27
+
28
+
29
+
30
+