VerdantClaw-Secure / Dockerfile
TheEdict's picture
Add zstd dependency for Ollama install
068b3a0 verified
Raw
History Blame Contribute Delete
3.18 kB
FROM memgraph/memgraph-mage:latest
# Force rebuild: 2026-03-20-21-20
USER root
# 1. System Dependencies
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
curl git make g++ bash jq procps net-tools python3 python3-pip dos2unix ca-certificates gnupg \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
# 2. Python Dependencies (Matching HuggingClaw success)
RUN python3 -m pip install --no-cache-dir --break-system-packages \
huggingface_hub tomli tomli-w gqlalchemy pymgclient marimo plotly
# 3. Install ZeroClaw
RUN arch=$(uname -m) && \
if [ "$arch" = "x86_64" ]; then \
URL="https://github.com/zeroclaw-labs/zeroclaw/releases/latest/download/zeroclaw-x86_64-unknown-linux-gnu.tar.gz"; \
elif [ "$arch" = "aarch64" ]; then \
URL="https://github.com/zeroclaw-labs/zeroclaw/releases/latest/download/zeroclaw-aarch64-unknown-linux-gnu.tar.gz"; \
else \
echo "Unsupported architecture: $arch" && exit 1; \
fi && \
curl -fsSL "$URL" -o zeroclaw.tar.gz && \
tar -xzf zeroclaw.tar.gz && \
mv zeroclaw /usr/local/bin/zeroclaw && \
chmod +x /usr/local/bin/zeroclaw && \
rm zeroclaw.tar.gz
# Install pi-acp for ACP support (Marimo AI integration)
# REMOVED - using Ollama instead
# RUN npm install -g pi-acp
# Install Pi coding agent (required by pi-acp)
# REMOVED - using Ollama instead
# RUN npm install -g @mariozechner/pi-coding-agent
# Install stdio-to-ws bridge (Marimo needs WebSocket for ACP)
# REMOVED - using Ollama instead
# RUN npm install -g stdio-to-ws
# Install Ollama (AI connector) - needs zstd first
RUN apt-get update && apt-get install -y zstd && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://ollama.com/install.sh | sh
WORKDIR /app
# 4. Setup permissions for HF spaces user (UID 1000)
RUN mkdir -p /app /home/node/.zeroclaw /home/node/.omniroute /var/log/memgraph /var/lib/memgraph /var/run/memgraph /etc/memgraph && \
chown -R 1000:1000 /app /home/node /var/log/memgraph /var/lib/memgraph /var/run/memgraph /etc/memgraph && \
chmod -R 777 /var/log/memgraph /var/lib/memgraph /var/run/memgraph /etc/memgraph
USER 1000
# 5. Install Node.js dependencies
COPY --chown=1000:1000 package*.json ./
RUN npm install
# 6. Copy application files
COPY --chown=1000:1000 scripts/ ./scripts/
COPY --chown=1000:1000 public/ ./public/
COPY --chown=1000:1000 config/ ./config/
COPY --chown=1000:1000 README.md ./README.md
COPY --chown=1000:1000 VERSION ./VERSION
COPY --chown=1000:1000 app.py ./app.py
COPY --chown=1000:1000 requirements.txt ./requirements.txt
# 7. Make scripts executable and fix line endings
RUN dos2unix /app/scripts/*.sh && \
chmod +x /app/scripts/*.sh
# Set environment
ENV PORT=7860
ENV GRAPH_VIEWER_PORT=7861
ENV OMNIROUTE_URL=http://localhost:20128/v1
ENV HOME=/home/node
ENV NODE_OPTIONS="--max-old-space-size=1024"
ENV MEMGRAPH_MEMORY_LIMIT="4GB"
ENV MEMGRAPH_LICENSE_KEY=""
# Expose ports
EXPOSE 7860 7861 20128 7687
# Start all services via entrypoint
ENTRYPOINT ["/bin/bash", "/app/scripts/entrypoint.sh"]