arnavzz Claude Sonnet 4.6 commited on
Commit
be9ae96
·
1 Parent(s): c14504c

feat: add root Dockerfile for HF Spaces deployment

Browse files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
6
+
7
+ COPY code_debug_env/server/requirements.txt ./requirements.txt
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ COPY . .
11
+
12
+ ENV PYTHONPATH=/app
13
+ ENV PYTHONUNBUFFERED=1
14
+
15
+ EXPOSE 7860
16
+
17
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
18
+ CMD curl -f http://localhost:7860/health || exit 1
19
+
20
+ CMD ["uvicorn", "code_debug_env.server.app:app", "--host", "0.0.0.0", "--port", "7860"]