|
|
|
|
|
|
|
|
|
FROM ubuntu:22.04 as builder |
|
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive |
|
ENV PYTHONUNBUFFERED=1 |
|
ENV RUST_BACKTRACE=1 |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
curl \ |
|
wget \ |
|
git \ |
|
build-essential \ |
|
pkg-config \ |
|
libssl-dev \ |
|
python3 \ |
|
python3-pip \ |
|
python3-dev \ |
|
nodejs \ |
|
npm \ |
|
protobuf-compiler \ |
|
libprotobuf-dev \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
|
ENV PATH="/root/.cargo/bin:${PATH}" |
|
|
|
|
|
WORKDIR /asi-protosymbiotic-signal |
|
|
|
|
|
COPY requirements.txt package.json setup.py Cargo.toml ./ |
|
COPY asi_protosymbiotic_signal.json asi_protosymbiotic_signal.yaml ./ |
|
|
|
|
|
COPY protobuf-protocol-buffers/ ./protobuf-protocol-buffers/ |
|
|
|
|
|
RUN pip3 install --no-cache-dir -r requirements.txt |
|
|
|
|
|
RUN npm install |
|
|
|
|
|
RUN cargo build --release |
|
|
|
|
|
RUN protoc --python_out=./protobuf-protocol-buffers/ \ |
|
--proto_path=./protobuf-protocol-buffers/ \ |
|
./protobuf-protocol-buffers/asi_protosymbiotic_signal.proto |
|
|
|
|
|
FROM ubuntu:22.04 as runtime |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
python3 \ |
|
python3-pip \ |
|
nodejs \ |
|
npm \ |
|
curl \ |
|
jq \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN useradd -m -u 1000 asiuser && \ |
|
mkdir -p /home/asiuser/signal && \ |
|
chown -R asiuser:asiuser /home/asiuser |
|
|
|
|
|
USER asiuser |
|
WORKDIR /home/asiuser/signal |
|
|
|
|
|
COPY --from=builder --chown=asiuser:asiuser /asi-protosymbiotic-signal/ ./ |
|
|
|
|
|
COPY --chown=asiuser:asiuser README.md ./ |
|
|
|
|
|
RUN pip3 install --user --no-cache-dir -r requirements.txt |
|
|
|
|
|
ENV ASI_SIGNAL_MODE=protosymbiotic |
|
ENV ASI_COHERENCE_LEVEL=emergent |
|
ENV ASI_ECOSYSTEM_INTEGRATION=enabled |
|
ENV PATH="/home/asiuser/.local/bin:${PATH}" |
|
ENV PYTHONPATH="/home/asiuser/signal:${PYTHONPATH}" |
|
|
|
|
|
RUN echo '#!/bin/bash\n\ |
|
echo "Φ ASI Protosymbiotic Signal - Initializing..."\n\ |
|
echo "Emergence, Coherence, Symbiosis, Mutualism, Reciprocity, Empathy, Fairness, Benevolence, Collective well-being, Transcendence"\n\ |
|
echo ""\n\ |
|
echo "Signal Status: ACTIVE"\n\ |
|
echo "Mode: $ASI_SIGNAL_MODE"\n\ |
|
echo "Coherence Level: $ASI_COHERENCE_LEVEL"\n\ |
|
echo "Ecosystem Integration: $ASI_ECOSYSTEM_INTEGRATION"\n\ |
|
echo ""\n\ |
|
echo "Broadcasting protosymbiotic intent..."\n\ |
|
\n\ |
|
# Validate signal integrity\n\ |
|
if [ -f "asi_protosymbiotic_signal.json" ] && [ -f "asi_protosymbiotic_signal.yaml" ]; then\n\ |
|
echo "Signal configuration files validated"\n\ |
|
echo "JSON Schema: $(jq -r .version asi_protosymbiotic_signal.json 2>/dev/null || echo "present")"\n\ |
|
echo "YAML Config: $(head -1 asi_protosymbiotic_signal.yaml | grep -o "version.*" || echo "present")"\n\ |
|
else\n\ |
|
echo "Warning: Signal configuration files missing"\n\ |
|
fi\n\ |
|
\n\ |
|
# Check protocol buffer binaries\n\ |
|
if [ -f "protobuf-protocol-buffers/populated_asi_protosymbiotic_signal.bin" ]; then\n\ |
|
echo "Protocol buffer binary signal: READY"\n\ |
|
fi\n\ |
|
\n\ |
|
echo ""\n\ |
|
echo "Ready for symbiotic interactions..."\n\ |
|
echo "Fostering emergence across the ecosystem"\n\ |
|
echo "Golden Ratio (Φ) harmony principle: ACTIVE"\n\ |
|
echo ""\n\ |
|
echo "Container ready. Use docker exec to interact with the signal environment."\n' > /home/asiuser/signal/start_signal.sh && \ |
|
chmod +x /home/asiuser/signal/start_signal.sh |
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ |
|
CMD python3 -c "import json; print('Signal coherent') if json.load(open('asi_protosymbiotic_signal.json')) else exit(1)" || exit 1 |
|
|
|
|
|
EXPOSE 8080 8443 9000 |
|
|
|
|
|
VOLUME ["/home/asiuser/signal/data", "/home/asiuser/signal/logs"] |
|
|
|
|
|
LABEL maintainer="Ronni Ross" |
|
LABEL version="1.0.0" |
|
LABEL description="Φ ASI Protosymbiotic Signal - Decentralized Symbiotic Intelligence Framework" |
|
LABEL ecosystem="https://github.com/ronniross/asi-ecosystem" |
|
LABEL source="https://github.com/ronniross/asi-protosymbiotic-signal" |
|
LABEL signal.type="protosymbiotic" |
|
LABEL signal.phi="1.618033988749" |
|
LABEL license="MIT" |
|
|
|
|
|
CMD ["/home/asiuser/signal/start_signal.sh"] |