mgbam commited on
Commit
e8cb742
Β·
verified Β·
1 Parent(s): b80050e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -9
Dockerfile CHANGED
@@ -1,32 +1,31 @@
1
  # ─────────────────────────────────────────────────────────────
2
- # BizIntel AI Ultra – HuggingΒ Face Space (Docker + Streamlit)
3
  # ─────────────────────────────────────────────────────────────
4
 
5
  FROM python:3.10-slim
6
 
7
- # ── Basic Python settings ───────────────────────────────────
8
  ENV PYTHONDONTWRITEBYTECODE=1
9
  ENV PYTHONUNBUFFERED=1
10
 
11
- # ── Create app directory & make it the working dir ──────────
12
  WORKDIR /app
13
- ENV HOME=/app # ensure Streamlit writes into /app
14
 
15
- # ── Install Python dependencies ─────────────────────────────
16
  COPY requirements.txt /app/
17
  RUN pip install --upgrade pip && pip install -r requirements.txt
18
 
19
- # ── Copy the rest of the source code ────────────────────────
20
  COPY . /app
21
 
22
- # ── Fix Streamlit & Matplotlib permission issues ────────────
23
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
24
  ENV MPLCONFIGDIR=/app/.config/matplotlib
25
- # Disable Streamlit usage‑stats (avoids writes to $HOME/.streamlit)
26
  ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
27
 
28
  RUN mkdir -p /app/.streamlit /app/.config/matplotlib
29
 
30
- # ── Expose the HF‑required port & launch Streamlit ──────────
31
  EXPOSE 7860
32
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
1
  # ─────────────────────────────────────────────────────────────
2
+ # BizIntel AI Ultra β€’ HuggingΒ Face Space (Docker + Streamlit)
3
  # ─────────────────────────────────────────────────────────────
4
 
5
  FROM python:3.10-slim
6
 
7
+ # Basic Python settings
8
  ENV PYTHONDONTWRITEBYTECODE=1
9
  ENV PYTHONUNBUFFERED=1
10
 
11
+ # Create app directory & make it the working dir
12
  WORKDIR /app
13
+ ENV HOME=/app
14
 
15
+ # Install Python dependencies
16
  COPY requirements.txt /app/
17
  RUN pip install --upgrade pip && pip install -r requirements.txt
18
 
19
+ # Copy the rest of the source code
20
  COPY . /app
21
 
22
+ # Fix Streamlit & Matplotlib permission issues
23
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
24
  ENV MPLCONFIGDIR=/app/.config/matplotlib
 
25
  ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
26
 
27
  RUN mkdir -p /app/.streamlit /app/.config/matplotlib
28
 
29
+ # Expose HuggingΒ Face default port and launch app
30
  EXPOSE 7860
31
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]