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

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -11
Dockerfile CHANGED
@@ -1,31 +1,25 @@
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"]
 
 
 
 
 
1
  FROM python:3.10-slim
2
 
 
3
  ENV PYTHONDONTWRITEBYTECODE=1
4
  ENV PYTHONUNBUFFERED=1
5
 
 
6
  WORKDIR /app
7
  ENV HOME=/app
8
 
9
+ # Install deps
10
  COPY requirements.txt /app/
11
  RUN pip install --upgrade pip && pip install -r requirements.txt
12
 
13
+ # Copy code
14
  COPY . /app
15
 
16
+ # Streamlit / Matplotlib writable dirs
17
  ENV STREAMLIT_CONFIG_DIR=/app/.streamlit
18
  ENV MPLCONFIGDIR=/app/.config/matplotlib
19
  ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
20
 
21
+ RUN mkdir -p /app/.streamlit /app/.config/matplotlib \
22
+ && chmod -R 777 /app/.streamlit /app/.config/matplotlib
23
 
 
24
  EXPOSE 7860
25
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]