Spaces:
Running
Running
Commit ·
2ddf6cd
1
Parent(s): 5659de8
Add Node.js for Gradio SSR build, bind to 0.0.0.0:7860
Browse filesGradio 6 hangs without Node.js. Also explicitly set server_name
and server_port for Docker SDK compatibility.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Dockerfile +3 -1
- app.py +1 -1
Dockerfile
CHANGED
|
@@ -1,6 +1,8 @@
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
-
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
| 4 |
|
| 5 |
RUN useradd -m -u 1000 user
|
| 6 |
WORKDIR /app
|
|
|
|
| 1 |
FROM python:3.12-slim
|
| 2 |
|
| 3 |
+
RUN apt-get update && apt-get install -y git curl && rm -rf /var/lib/apt/lists/*
|
| 4 |
+
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
|
| 5 |
+
apt-get install -y nodejs && rm -rf /var/lib/apt/lists/*
|
| 6 |
|
| 7 |
RUN useradd -m -u 1000 user
|
| 8 |
WORKDIR /app
|
app.py
CHANGED
|
@@ -647,4 +647,4 @@ WORKSPACE_DIR = load_workspace()
|
|
| 647 |
|
| 648 |
if __name__ == "__main__":
|
| 649 |
demo = build_app()
|
| 650 |
-
demo.launch(ssr_mode=False)
|
|
|
|
| 647 |
|
| 648 |
if __name__ == "__main__":
|
| 649 |
demo = build_app()
|
| 650 |
+
demo.launch(ssr_mode=False, server_name="0.0.0.0", server_port=7860)
|