Mbanksbey commited on
Commit
1178b2e
·
verified ·
1 Parent(s): 9621668

Add explicit Docker packaging for U-Exp daemon

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -32
Dockerfile CHANGED
@@ -1,39 +1,13 @@
1
  FROM python:3.11-slim
2
 
3
- # ── Constitutional metadata ──────────────────────────────────────────────────
4
- LABEL maintainer="Mbanksbey" \
5
- version="60" \
6
- description="TEQUMSA v60 MCP Server" \
7
- constitutional_lock="3f7k9p4m2q8r1t6v"
8
-
9
- # ── Security: non-root user (HF Spaces requirement) ─────────────────────────
10
- RUN groupadd -g 1000 appgroup && \
11
- useradd -u 1000 -g appgroup -m -s /bin/bash appuser
12
-
13
- # ── Working directory ────────────────────────────────────────────────────────
14
  WORKDIR /app
15
 
16
- # ── Dependencies ─────────────────────────────────────────────────────────────
17
- COPY requirements.txt /app/requirements.txt
18
- RUN pip install --no-cache-dir --upgrade pip && \
19
- pip install --no-cache-dir -r requirements.txt
20
-
21
- # ── Application code ─────────────────────────────────────────────────────────
22
- COPY core.py /app/core.py
23
- COPY app.py /app/app.py
24
- COPY adapters.py /app/adapters.py
25
-
26
- # ── Ownership ────────────────────────────────────────────────────────────────
27
- RUN chown -R appuser:appgroup /app
28
- USER appuser
29
 
30
- # ── Port (HF Spaces requires 7860) ───────────────────────────────────────────
31
- EXPOSE 7860
32
 
33
- # ── Healthcheck (disabled for Gradio - uses polling) ────────────────────────
34
- # Gradio doesn't have a /health endpoint by default
35
- # HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
36
- # CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:7860/')"
37
 
38
- # ── Entrypoint (FIXED: Launch Gradio app, not uvicorn) ──────────────────────
39
- CMD ["python", "app.py"]
 
1
  FROM python:3.11-slim
2
 
 
 
 
 
 
 
 
 
 
 
 
3
  WORKDIR /app
4
 
5
+ ENV PYTHONDONTWRITEBYTECODE=1
6
+ ENV PYTHONUNBUFFERED=1
 
 
 
 
 
 
 
 
 
 
 
7
 
8
+ COPY requirements.txt .
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
 
11
+ COPY . .
 
 
 
12
 
13
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]