parthib07 commited on
Commit
3c091b6
·
verified ·
1 Parent(s): 96f3d14

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -10
Dockerfile CHANGED
@@ -1,20 +1,26 @@
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"]
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1 \
5
+ PIP_NO_CACHE_DIR=1 \
6
+ PORT=7860
7
 
8
  WORKDIR /app
9
 
10
+ # System deps (kept minimal). git is not required.
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  build-essential \
 
 
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Python dependencies first (better layer caching)
16
+ COPY ai_business_automation_agent/requirements.txt /app/ai_business_automation_agent/requirements.txt
17
+ RUN pip install --upgrade pip && pip install -r /app/ai_business_automation_agent/requirements.txt
18
 
19
+ # Copy application code
20
+ COPY . /app
21
 
22
+ # Hugging Face Spaces uses 7860
23
+ EXPOSE 7860
24
 
25
+ CMD ["streamlit", "run", "ai_business_automation_agent/app.py", "--server.address=0.0.0.0", "--server.port=7860", "--server.headless=true"]
26