Spaces:
Sleeping
Sleeping
Upload 15 files
Browse files- Dockerfile +15 -0
- Dockerfile.ui-only +11 -0
Dockerfile
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Serves BOTH the Streamlit UI (/) and the MCP endpoint (/mcp) on port 7860.
|
| 2 |
+
# HF Spaces only reads a file named exactly "Dockerfile" — that is why a
|
| 3 |
+
# "Dockerfile.mcp" alone never takes effect.
|
| 4 |
+
# UI-only → use Dockerfile.ui-only
|
| 5 |
+
# MCP-only → use Dockerfile.mcp
|
| 6 |
+
FROM python:3.11-slim
|
| 7 |
+
WORKDIR /app
|
| 8 |
+
COPY requirements.txt .
|
| 9 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
+
COPY . .
|
| 11 |
+
EXPOSE 7860
|
| 12 |
+
ENV PORT=7860 STREAMLIT_PORT=8501 \
|
| 13 |
+
STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200 \
|
| 14 |
+
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
| 15 |
+
CMD ["python", "combined_server.py"]
|
Dockerfile.ui-only
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
+
WORKDIR /app
|
| 3 |
+
COPY requirements.txt .
|
| 4 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 5 |
+
COPY . .
|
| 6 |
+
EXPOSE 7860
|
| 7 |
+
ENV STREAMLIT_SERVER_PORT=7860 STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
|
| 8 |
+
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \
|
| 9 |
+
STREAMLIT_SERVER_MAX_UPLOAD_SIZE=200
|
| 10 |
+
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", \
|
| 11 |
+
"--server.enableXsrfProtection=false", "--server.enableCORS=false"]
|