dhani10 commited on
Commit
6c432bd
·
verified ·
1 Parent(s): ea9aa56

Deploy Docker-based Streamlit app

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -0
Dockerfile CHANGED
@@ -8,14 +8,30 @@ ENV PIP_NO_CACHE_DIR=1 PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
8
  # Working directory
9
  WORKDIR /app
10
 
 
 
 
11
  # Copy and install Python deps first (better layer caching)
 
12
  COPY requirements.txt /app/
 
13
  RUN pip install --upgrade pip && pip install -r requirements.txt
14
 
15
  # Copy app code
 
 
16
  COPY streamlit_app.py /app/
17
  COPY README.md /app/
18
 
 
 
 
 
 
 
 
 
 
19
  # Expose the port that the Space will connect to
20
  EXPOSE 7860
21
 
 
8
  # Working directory
9
  WORKDIR /app
10
 
11
+ # System deps (optional but useful)
12
+ #RUN apt-get update && apt-get install -y --no-install-recommends curl ca-certificates && rm -rf /var/lib/apt/lists/*
13
+
14
  # Copy and install Python deps first (better layer caching)
15
+ #COPY requirements.txt .
16
  COPY requirements.txt /app/
17
+ #RUN pip install -U pip && pip install --no-cache-dir -r requirements.txt
18
  RUN pip install --upgrade pip && pip install -r requirements.txt
19
 
20
  # Copy app code
21
+ #COPY streamlit_app.py .
22
+ # Copy only what you need for the app
23
  COPY streamlit_app.py /app/
24
  COPY README.md /app/
25
 
26
+ # Hugging Face caches (writable on Spaces)
27
+ #ENV HF_HOME=/tmp/huggingface HF_HUB_CACHE=/tmp/huggingface/hub
28
+
29
+ # Streamlit defaults for Docker
30
+ #ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false
31
+
32
+ # (Optional) if you keep static assets, copy them here too
33
+ # COPY assets/ /app/assets/
34
+
35
  # Expose the port that the Space will connect to
36
  EXPOSE 7860
37