ReMe/Dockerfile
jinliyl ae55e2e570
Some checks are pending
CI / Python packages / Build and verify distributions (push) Waiting to run
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Hermes embedded - ubuntu-latest (push) Waiting to run
CI / Python tests / Hermes embedded - windows-latest (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / ReMe Studio / Studio checks (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / Build documentation (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
feat!: split proactive runtimes and add Studio backend management (#776)
* refactor(proactive)!: separate runtime ownership and unify delivery

* refactor(proactive): finish runtime and Studio migration

* test(proactive): make scheduled skip coverage deterministic

* refactor(studio): unify navigation and notebook resource loading

* feat(studio): edit workspace documents and update proactive task names

* refactor(studio): simplify task settings and navigation

* feat(studio): secure and supervise backend settings

* feat(studio): unify workbench timelines and refine desktop updates

Use shared timeline panes for notebook, memory, and resources. Add Todo creation ordering, persist companion visibility, and align desktop update handling and release artifacts.

Recheck editor file versions at read and publication boundaries. Retry reminder detail requests from the resource view.

* fix(studio): support unsigned GitHub preview releases

* fix: verify container state and isolate proactive view errors

Mount private supervisor state in Docker smoke tests and verify token and settings persistence. Exercise Studio startup with a loopback-only model fixture, and exclude packaged desktop output from Docker contexts.

Keep Remy subscriptions and healthy tasks available when an individual task has an invalid workspace path or session history.

* fix(home): align candidate Docker context exclusions

* chore(deps): update openai-codex dependency to v0.172.0

- Bump openai-codex from version 0.169.0 to 0.172.0 in pyproject.toml
- Keep other dependencies unchanged
- Ensure compatibility with latest openai-codex features and fixes

* fix(daemon): discover parent dotenv and isolate listeners

Restore parent-directory environment discovery in workers while retaining system precedence. Partition the default supervisor profile and lock by the configured bind address and port.
2026-11-25 21:33:16 +08:00

55 lines
2.4 KiB
Docker

# syntax=docker/dockerfile:1
FROM node:22-bookworm-slim AS studio-builder
WORKDIR /build
COPY reme/_version.py reme/_version.py
COPY reme_studio/ reme_studio/
RUN --mount=type=cache,target=/root/.npm npm ci --prefix reme_studio --ignore-scripts
RUN npm run build:static --prefix reme_studio && test -f reme_studio/web/dist-static/index.html
FROM python:3.11-slim-bookworm AS python-builder
RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /build
COPY pyproject.toml README.md LICENSE ./
COPY reme/ reme/
COPY reme_studio/web/python/ reme_studio/web/python/
COPY --from=studio-builder /build/reme_studio/web/dist-static/ reme_studio/web/dist-static/
COPY scripts/package_studio.py scripts/package_studio.py
RUN python scripts/package_studio.py && python -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
RUN --mount=type=cache,target=/root/.cache/pip \
python -m pip install --upgrade pip \
&& python -m pip install ./reme_studio/web/python ".[core,image-heif]" \
&& python -m pip check
# Check installed resources away from the checkout, so source files cannot mask
# incomplete wheels or a Studio package fetched accidentally from PyPI.
WORKDIR /tmp
RUN python -I -c "import reme; from reme_studio import static_dir; from reme.config import resolve_app_config; assert (static_dir() / 'index.html').is_file(); assert resolve_app_config(log_config=False)['service']['backend'] == 'http'"
FROM python:3.11-slim-bookworm AS runtime
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates git libgomp1 libstdc++6 tini tzdata \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --gid 1000 reme \
&& useradd --uid 1000 --gid reme --no-create-home reme \
&& mkdir -p /app /data /state \
&& chown reme:reme /app /data /state \
&& chmod 700 /state
COPY --from=python-builder /opt/venv /opt/venv
COPY scripts/reme_container.py /usr/local/lib/reme_container.py
ENV PATH="/opt/venv/bin:${PATH}" \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
HOME=/tmp/reme-home \
REME_DAEMON_DIR=/state \
REME_WORKSPACE_DIR=/data \
REME_HOST=0.0.0.0
WORKDIR /app
USER reme
EXPOSE 2333
HEALTHCHECK --interval=30s --timeout=5s --start-period=120s --retries=3 \
CMD ["python", "/usr/local/lib/reme_container.py", "--healthcheck"]
ENTRYPOINT ["/usr/bin/tini", "--", "python", "/usr/local/lib/reme_container.py"]
CMD ["start"]