Spaces:
Build error
Build error
Dmitry Beresnev commited on
Commit ·
47f9a0d
1
Parent(s): 969d174
fix dockerfile
Browse files- Dockerfile +5 -6
- app.py +9 -5
Dockerfile
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
FROM python:3.
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
@@ -7,10 +7,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 7 |
bash \
|
| 8 |
curl \
|
| 9 |
ca-certificates \
|
| 10 |
-
caddy \
|
| 11 |
ffmpeg \
|
| 12 |
git \
|
| 13 |
-
supervisor \
|
| 14 |
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
| 15 |
&& apt-get install -y --no-install-recommends nodejs \
|
| 16 |
&& npm install -g openclaw \
|
|
@@ -33,12 +31,13 @@ ENV VAULT_PATH=/app/vault
|
|
| 33 |
ENV OPENCLAW_HOME=/app/.openclaw
|
| 34 |
ENV OPENCLAW_STATE_DIR=/app/.openclaw/state
|
| 35 |
ENV AUTO_START_GATEWAY=0
|
| 36 |
-
ENV EXTERNAL_GATEWAY_MANAGED=
|
| 37 |
-
ENV OPENCLAW_STANDARD_UI_PUBLIC_URL=
|
| 38 |
ENV OPENCLAW_GATEWAY_LOG_PATH=/tmp/openclaw-gateway.log
|
|
|
|
| 39 |
|
| 40 |
RUN mkdir -p /app/vault /app/.openclaw/state
|
| 41 |
|
| 42 |
EXPOSE 7860
|
| 43 |
|
| 44 |
-
CMD ["
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
| 7 |
bash \
|
| 8 |
curl \
|
| 9 |
ca-certificates \
|
|
|
|
| 10 |
ffmpeg \
|
| 11 |
git \
|
|
|
|
| 12 |
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
| 13 |
&& apt-get install -y --no-install-recommends nodejs \
|
| 14 |
&& npm install -g openclaw \
|
|
|
|
| 31 |
ENV OPENCLAW_HOME=/app/.openclaw
|
| 32 |
ENV OPENCLAW_STATE_DIR=/app/.openclaw/state
|
| 33 |
ENV AUTO_START_GATEWAY=0
|
| 34 |
+
ENV EXTERNAL_GATEWAY_MANAGED=0
|
| 35 |
+
ENV OPENCLAW_STANDARD_UI_PUBLIC_URL=
|
| 36 |
ENV OPENCLAW_GATEWAY_LOG_PATH=/tmp/openclaw-gateway.log
|
| 37 |
+
ENV OPENCLAW_GATEWAY_ERR_LOG_PATH=/tmp/openclaw-gateway.err.log
|
| 38 |
|
| 39 |
RUN mkdir -p /app/vault /app/.openclaw/state
|
| 40 |
|
| 41 |
EXPOSE 7860
|
| 42 |
|
| 43 |
+
CMD ["sh", "-c", "${OPENCLAW_BIN} gateway run --port ${OPENCLAW_PORT} --bind loopback --allow-unconfigured --dev --force --verbose > /tmp/openclaw-gateway.log 2> /tmp/openclaw-gateway.err.log & exec uv run streamlit run app.py --server.address=0.0.0.0 --server.port=7860"]
|
app.py
CHANGED
|
@@ -418,11 +418,15 @@ with std_ui_embed_col:
|
|
| 418 |
components.iframe(public_ui_url, height=560, scrolling=True)
|
| 419 |
st.link_button("Open Standard UI", public_ui_url, use_container_width=True)
|
| 420 |
else:
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
|
| 427 |
st.divider()
|
| 428 |
|
|
|
|
| 418 |
components.iframe(public_ui_url, height=560, scrolling=True)
|
| 419 |
st.link_button("Open Standard UI", public_ui_url, use_container_width=True)
|
| 420 |
else:
|
| 421 |
+
try:
|
| 422 |
+
local_resp = requests.get(std_ui_url, timeout=3, allow_redirects=True)
|
| 423 |
+
if local_resp.status_code < 500 and local_resp.text.strip():
|
| 424 |
+
components.html(local_resp.text, height=560, scrolling=True)
|
| 425 |
+
st.caption("Rendered from internal gateway response.")
|
| 426 |
+
else:
|
| 427 |
+
st.info("Standard UI is not reachable yet. Start gateway and refresh.")
|
| 428 |
+
except Exception:
|
| 429 |
+
st.info("Standard UI is not reachable yet. Start gateway and refresh.")
|
| 430 |
|
| 431 |
st.divider()
|
| 432 |
|