workspace-template-codex (sha-71ba943)
Published 2026-07-04 16:56:35 +00:00 by pypi-publisher
Installation
docker pull git.moleculesai.app/molecule-ai/workspace-template-codex:sha-71ba943sha256:2708a73203c23bbc556d1f59688891db6d38562a88799639f93f703d3c82d5ae
About this package
Molecule AI workspace template — codex runtime
Image Layers
| # debian.sh --arch 'amd64' out/ 'trixie' '@1782172800' |
| ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
| ENV LANG=C.UTF-8 |
| RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; apt-get dist-clean # buildkit |
| ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D |
| ENV PYTHON_VERSION=3.11.15 |
| ENV PYTHON_SHA256=272179ddd9a2e41a0fc8e42e33dfbdca0b3711aa5abf372d3f2d51543d09b625 |
| RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; apt-get dist-clean; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==79.0.1' 'wheel<0.46' ; pip3 --version # buildkit |
| RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit |
| CMD ["python3"] |
| RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl ca-certificates git gosu xz-utils sudo util-linux docker.io && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && apt-get install -y --no-install-recommends nodejs && rm -rf /var/lib/apt/lists/* # buildkit |
| RUN /bin/sh -c useradd -u 1000 -m -s /bin/bash agent # buildkit |
| RUN /bin/sh -c set -eux; printf 'agent ALL=(ALL) NOPASSWD:ALL\n' > /etc/sudoers.d/agent-t4; chmod 0440 /etc/sudoers.d/agent-t4; visudo -cf /etc/sudoers.d/agent-t4; groupadd -f docker; usermod -aG docker agent; id agent # buildkit |
| ARG MCP_SERVER_VERSION=1.7.0 |
| USER agent |
| RUN |1 MCP_SERVER_VERSION=1.7.0 /bin/sh -c set -eux; mkdir -p /home/agent/.npm; printf '@molecule-ai:registry=https://git.moleculesai.app/api/packages/molecule-ai/npm/\n' > /home/agent/.npmrc; warm="$(mktemp -d)"; cd "$warm"; npm init -y >/dev/null 2>&1; npm install --no-audit --no-fund --loglevel=error "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}"; cd /; rm -rf "$warm"; printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"prebake","version":"1"}}}' | MOLECULE_MCP_MODE=management timeout 60 npx -y --prefer-offline "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}" >/dev/null 2>&1 || true; printf '%s\n%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"verify","version":"1"}}}' '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | MOLECULE_MCP_MODE=management timeout 60 npx -y --offline "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}" 2>/dev/null | grep -q provision_workspace || (echo "ERROR: pre-baked @molecule-ai/mcp-server@${MCP_SERVER_VERSION} did not resolve OFFLINE or provision_workspace missing — the concierge warm-up bake is broken" >&2 && exit 1) # buildkit |
| USER root |
| WORKDIR /app |
| ARG RUNTIME_VERSION=0.3.75 |
| COPY requirements.txt . # buildkit |
| ARG PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ |
| ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c pip install --no-cache-dir --index-url "${PIP_INDEX_URL}" --extra-index-url "${PIP_EXTRA_INDEX_URL}" -r requirements.txt && if [ -n "${RUNTIME_VERSION}" ]; then pip install --no-cache-dir --index-url "${PIP_INDEX_URL}" --extra-index-url "${PIP_EXTRA_INDEX_URL}" --upgrade "molecules-workspace-runtime==${RUNTIME_VERSION}"; fi && python3 -c "import molecule_runtime.preflight as pf; s=getattr(pf,'SUPPORTED_RUNTIMES',None); s.add('codex') if isinstance(s,set) else None; print('preflight SUPPORTED_RUNTIMES shim:', 'patched' if isinstance(s,set) else 'n/a (adapter-module discovery is authoritative)')" || true # buildkit |
| COPY adapter.py executor.py app_server.py provider_config.py __init__.py ./ # buildkit |
| COPY config.yaml ./ # buildkit |
| COPY start.sh /usr/local/bin/start.sh # buildkit |
| COPY scripts/molecule-askpass /usr/local/bin/molecule-askpass # buildkit |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /usr/local/bin/molecule-askpass # buildkit |
| COPY render_provider_toml.py /usr/local/bin/render_provider_toml.py # buildkit |
| COPY provider_config.py /usr/local/bin/provider_config.py # buildkit |
| COPY codex_minimax_config.sh codex_mcp_config.sh /usr/local/bin/ # buildkit |
| COPY codex_auth_refresh.sh /usr/local/bin/codex_auth_refresh.sh # buildkit |
| COPY codex_auth_sync.sh /usr/local/bin/codex_auth_sync.sh # buildkit |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /usr/local/bin/start.sh /usr/local/bin/codex_minimax_config.sh /usr/local/bin/codex_mcp_config.sh /usr/local/bin/render_provider_toml.py /usr/local/bin/codex_auth_refresh.sh /usr/local/bin/codex_auth_sync.sh # buildkit |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c set -eux; bash -n /usr/local/bin/codex_auth_refresh.sh; rc=0; CODEX_HOME=/tmp/.codex-smoke-no-auth /usr/local/bin/codex_auth_refresh.sh --once || rc=$?; rm -rf /tmp/.codex-smoke-no-auth; if [ "$rc" -eq 127 ]; then echo "FATAL: codex_auth_refresh.sh exited 127 at image-build smoke — python3 helper not located. PR#19 OAuth auto-refresh would ship broken (PR#24 regression-pin)." >&2; exit 1; fi; if [ "$rc" -ne 1 ]; then echo "FATAL: codex_auth_refresh.sh smoke produced rc=$rc (expected rc=1 skip:no_auth_json). Image-build watchdog smoke failed." >&2; exit 1; fi; echo "[image-build smoke] codex_auth_refresh.sh OAuth watchdog OK (rc=1 skip:no_auth_json — python3 helper resolves)." # buildkit |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c set -eux; bash -n /usr/local/bin/codex_auth_sync.sh; rc=0; CODEX_HOME=/tmp/.codex-sync-smoke-absent /usr/local/bin/codex_auth_sync.sh --once || rc=$?; rm -rf /tmp/.codex-sync-smoke-absent; if [ "$rc" -eq 127 ]; then echo "FATAL: codex_auth_sync.sh exited 127 at image-build smoke — python3 helper not located. The codex auth re-sync would ship broken and the shared-token burn would recur." >&2; exit 1; fi; if [ "$rc" -ne 1 ]; then echo "FATAL: codex_auth_sync.sh smoke produced rc=$rc (expected rc=1 skip: absent CODEX_HOME). Image-build re-sync smoke failed." >&2; exit 1; fi; echo "[image-build smoke] codex_auth_sync.sh re-sync watchdog OK (rc=1 skip:absent CODEX_HOME — python3 helper resolves)." # buildkit |
| RUN |4 MCP_SERVER_VERSION=1.7.0 RUNTIME_VERSION=0.3.75 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c npm install -g @openai/codex@0.130.0 # buildkit |
| USER agent |
| WORKDIR /home/agent |
| USER root |
| WORKDIR /app |
| ENV ADAPTER_MODULE=adapter PYTHONPATH=/app GIT_ASKPASS=/usr/local/bin/molecule-askpass |
| ENTRYPOINT ["/usr/local/bin/start.sh"] |
Labels
| Key | Value |
|---|---|
| org.opencontainers.image.description | Molecule AI workspace template — codex runtime |
| org.opencontainers.image.revision | 71ba9431045b6830c516cbffb86e91763455a7d8 |
| org.opencontainers.image.source | https://git.moleculesai.app/molecule-ai/molecule-ai-workspace-template-codex |
Details
Versions (7)
View all
sha-7bae5d5
2026-07-06
latest
2026-07-06
sha-5902a9a
2026-07-06
sha-3e480be
2026-07-06
sha-f10a09c
2026-07-05