zaheer140 commited on
Commit
ff969bd
·
verified ·
1 Parent(s): a089239

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -12
Dockerfile CHANGED
@@ -1,25 +1,33 @@
1
- # ScaleMate Executive SuperAgent — HuggingFace Space Dockerfile (Port 7860)
2
-
3
  FROM python:3.10-slim
4
 
5
- WORKDIR /app
6
-
7
- # Install system dependencies for Matplotlib & ReportLab PDF engine
8
- RUN apt-get update && apt-get install -y --no-install-recommends \
9
  build-essential \
10
  libpq-dev \
 
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Install Python requirements
 
 
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
- # Copy backend codebase
18
- COPY . .
 
 
 
 
 
 
19
 
20
- # HuggingFace Space Port Expose
21
  EXPOSE 7860
22
 
23
- # Run unified multi-agent server on Port 7860
24
- CMD ["uvicorn", "backend.SuperAgent.main:app", "--host", "0.0.0.0", "--port", "7860"]
25
 
 
 
 
1
+ # --- Backend Dockerfile for Hugging Face Spaces (Port 7860) ---
 
2
  FROM python:3.10-slim
3
 
4
+ # Install system dependencies for psycopg2 and other packages
5
+ RUN apt-get update && apt-get install -y \
 
 
6
  build-essential \
7
  libpq-dev \
8
+ curl \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ WORKDIR /app
12
+
13
+ # Copy and install root requirements
14
  COPY requirements.txt .
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Copy all backend files
18
+ COPY SuperAgent/ ./SuperAgent/
19
+ COPY agents/ ./agents/
20
+ COPY start_backend.sh ./start_backend.sh
21
+
22
+ # Environment variables
23
+ ENV PYTHONPATH=/app
24
+ ENV SPACE_ID=true
25
 
26
+ # Expose the port Hugging Face expects
27
  EXPOSE 7860
28
 
29
+ # Fix CRLF Windows line endings and make start script executable
30
+ RUN sed -i 's/\r$//' start_backend.sh && chmod +x start_backend.sh
31
 
32
+ # Run the startup script explicitly with bash to avoid CRLF issues
33
+ CMD ["/bin/bash", "./start_backend.sh"]