sadidft commited on
Commit
4e022da
·
verified ·
1 Parent(s): 38f6d11

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install dependencies first (cache layer)
7
+ COPY requirements.txt .
8
+ RUN pip install --no-cache-dir -r requirements.txt
9
+
10
+ # Copy source files
11
+ COPY config.py .
12
+ COPY utils.py .
13
+ COPY memory.py .
14
+ COPY knowledge.py .
15
+ COPY thinker.py .
16
+ COPY language.py .
17
+ COPY brain.py .
18
+ COPY main.py .
19
+
20
+ # Create data directory
21
+ RUN mkdir -p /app/data
22
+
23
+ # Expose port for HF Spaces
24
+ EXPOSE 7860
25
+
26
+ # Health check
27
+ HEALTHCHECK --interval=30s --timeout=10s --retries=3 \
28
+ CMD python -c "import httpx; r = httpx.get('http://localhost:7860/v1/health'); assert r.status_code == 200"
29
+
30
+ # Run
31
+ CMD ["python", "main.py"]