RayMelius Claude Sonnet 4.6 commited on
Commit
b1722ec
·
1 Parent(s): 49e29c1

Add Dockerfile for Hugging Face Spaces deployment (port 7860)

Browse files

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

Files changed (1) hide show
  1. Dockerfile +21 -0
Dockerfile ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install dependencies first (layer cache)
6
+ COPY requirements.txt pyproject.toml ./
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ # Copy source
10
+ COPY src/ ./src/
11
+ COPY config/ ./config/
12
+ COPY web/ ./web/
13
+
14
+ # Install the soci package (handles the src/ layout)
15
+ RUN pip install --no-cache-dir -e .
16
+
17
+ # Hugging Face Spaces requires port 7860
18
+ ENV PORT=7860
19
+ EXPOSE 7860
20
+
21
+ CMD ["python", "-m", "uvicorn", "soci.api.server:app", "--host", "0.0.0.0", "--port", "7860"]