manus-lite / Dockerfile
EdgeAIG's picture
Fix Dockerfile: remove duplicate FROM, restore DSH_COMMIT/WORKDIR
26d5642 verified
Raw History Blame Contribute Delete
2.67 kB
# DeepSeek Harness on Hugging Face Spaces (manus-lite).
#
# What this image does differently from a plain `npx @deepseek-ai/dsh web`:
# 1. Removes the loopback/remote differentiation: `ctx.connection.isLoopback`
# is patched to `true` at build time (see apply-patch.py), so remote
# operators get the full settings surface and settings persist to
# $DSH_HOME instead of memory. The server-side Host fence (DNS-rebinding
# defense) is untouched; this Space's hostname is declared trusted via
# --trusted-host in entrypoint.sh.
# 2. Binds 0.0.0.0:7860 through a --patch overlay (the CLI refuses
# --host 0.0.0.0, the webserver config schema allows it).
# 3. Puts DSH_HOME and the agent workspace on the attached bucket (/data),
# so sessions, settings, credentials, plugins, and files survive
# sleep/restart/rebuild.
#
# Pinned to the upstream commit the patch was verified against. Bump DSH_COMMIT
# deliberately: apply-patch.py fails the build if the source text changed.
FROM node:24-bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
# git: source checkout | python3/make/g++: native addon build (build:native-system)
RUN apt-get update && apt-get install -y --no-install-recommends \
git ca-certificates python3 build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN corepack enable && corepack prepare pnpm@11.7.0 --activate
# Pinned to the upstream commit the patch was verified against. Bump DSH_COMMIT
# deliberately: apply-patch.py fails the build if the source text changed.
ARG DSH_COMMIT=0d1f50007f9bca3f52b06e1c3074fa14d5fb0720
WORKDIR /opt/dsh
RUN git clone --depth 1 https://github.com/deepseek-ai/deepseek-harness.git . \
&& git fetch --depth 1 origin ${DSH_COMMIT} \
&& git checkout ${DSH_COMMIT} \
&& git log --oneline -1
# Deployment overlay: additive provider packages (web-search-lean), the bundle
# package.json that depends on them, and the lockfile regenerated against them.
# Copied over the pristine checkout so `pnpm install --frozen-lockfile` below
# still verifies. API keys are never in the overlay: AshnaAI arrives as the
# ASHNAAI_API_KEY Space secret at runtime; OpenCode free models via the native
# pi-ai opencode provider and keyless web search need no keys.
COPY overlay/ /opt/dsh/
# Fail-loud deployment patch: local = remote, no limit.
COPY apply-patch.py /opt/apply-patch.py
RUN python3 /opt/apply-patch.py
RUN pnpm install --frozen-lockfile
RUN pnpm run build
COPY dsh-deploy.patch.yml /opt/dsh-deploy.patch.yml
COPY entrypoint.sh /opt/entrypoint.sh
RUN chmod +x /opt/entrypoint.sh
ENV DSH_HOME=/data/dsh
EXPOSE 7860
ENTRYPOINT ["/opt/entrypoint.sh"]