Mayank2027 commited on
Commit
0f00000
·
verified ·
1 Parent(s): 5badd86

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -1
Dockerfile CHANGED
@@ -14,12 +14,21 @@ RUN npm run build
14
 
15
  FROM python:3.11-slim
16
  WORKDIR /app
 
 
17
  COPY --from=backend /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
18
  COPY --from=backend /app /app
 
 
19
  COPY --from=frontend-build /app/frontend/build /app/static
20
 
 
21
  RUN apt-get update && apt-get install -y git nodejs npm curl && rm -rf /var/lib/apt/lists/*
 
 
22
  RUN mkdir /sandbox && chmod 777 /sandbox
23
 
24
  ENV PYTHONUNBUFFERED=1
25
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
14
 
15
  FROM python:3.11-slim
16
  WORKDIR /app
17
+
18
+ # Copy Python site-packages and application code from backend stage
19
  COPY --from=backend /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
20
  COPY --from=backend /app /app
21
+
22
+ # Copy the built React frontend
23
  COPY --from=frontend-build /app/frontend/build /app/static
24
 
25
+ # Install additional system tools (git, node, npm, curl) for agent & terminal
26
  RUN apt-get update && apt-get install -y git nodejs npm curl && rm -rf /var/lib/apt/lists/*
27
+
28
+ # Create sandbox directory for the coding agent
29
  RUN mkdir /sandbox && chmod 777 /sandbox
30
 
31
  ENV PYTHONUNBUFFERED=1
32
+
33
+ # Use Python module path to run uvicorn (no need for /usr/local/bin/uvicorn)
34
+ CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]