Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
c876837
Create Cargo.toml
KOSASIH Mar 17, 2026
c7ae011
Create Cargo.toml
KOSASIH Mar 17, 2026
3f64731
Create lib.rs
KOSASIH Mar 17, 2026
144e1f8
Create agent.rs
KOSASIH Mar 17, 2026
cb6e79b
Create llm.rs
KOSASIH Mar 17, 2026
43c9a5e
Create memory.rs
KOSASIH Mar 17, 2026
d98db5f
Create pi-wallet.rs
KOSASIH Mar 17, 2026
f464e89
Create tools.rs
KOSASIH Mar 17, 2026
2c9eb34
Create ai_bot.rs
KOSASIH Mar 17, 2026
130397e
Create docker-compose.yml
KOSASIH Mar 17, 2026
2d9fbae
Create README.md
KOSASIH Mar 17, 2026
891fcaa
Create Cargo.toml
KOSASIH Mar 17, 2026
ad50d09
Create main.rs
KOSASIH Mar 17, 2026
2bf4a30
Create api.rs
KOSASIH Mar 17, 2026
b2144d0
Create metrics.rs
KOSASIH Mar 17, 2026
cc4eb65
Create templates.rs
KOSASIH Mar 17, 2026
ef23ba7
Create dashboard.html
KOSASIH Mar 17, 2026
aea8c6c
Create websocket.rs
KOSASIH Mar 17, 2026
8fb03ca
Create 001_create_metrics.sql
KOSASIH Mar 17, 2026
a9e6239
Update main.rs
KOSASIH Mar 17, 2026
ad3b636
Update api.rs
KOSASIH Mar 17, 2026
80f60ca
Update docker-compose.yml
KOSASIH Mar 17, 2026
e231e47
Create Dockerfile.dashboard
KOSASIH Mar 17, 2026
de966ce
Create Cargo.toml
KOSASIH Mar 17, 2026
1bbcdf3
Create lib.rs
KOSASIH Mar 17, 2026
5eb14b5
Create Cargo.toml
KOSASIH Mar 17, 2026
adb2175
Create lib.rs
KOSASIH Mar 17, 2026
1f5ba9e
Create Cargo.toml
KOSASIH Mar 17, 2026
d33e897
Create lib.rs
KOSASIH Mar 17, 2026
95f1181
Create Cargo.toml
KOSASIH Mar 17, 2026
e337c4b
Create main.rs
KOSASIH Mar 17, 2026
15a97af
Update docker-compose.yml
KOSASIH Mar 17, 2026
5c2d1a3
Update ai_bot.rs
KOSASIH Mar 17, 2026
a098351
Create Dockerfile.rust-builder
KOSASIH Mar 17, 2026
fbe59fc
Create Dockerfile.ai-agent
KOSASIH Mar 17, 2026
95d6870
Create prometheus.yml
KOSASIH Mar 17, 2026
354808f
Update Dockerfile.dashboard
KOSASIH Mar 17, 2026
ef37a50
Update ReadMe.md
KOSASIH Mar 17, 2026
a308aaa
Create rate_limiter.py
KOSASIH Mar 19, 2026
522d877
Create pyproject.toml
KOSASIH Mar 19, 2026
8078316
Create Dockerfile
KOSASIH Mar 19, 2026
ed4b1c0
Create __init__.py
KOSASIH Mar 19, 2026
d0246c7
Create config.py
KOSASIH Mar 19, 2026
29545f3
Create security.py
KOSASIH Mar 19, 2026
6d3dc28
Delete security directory
KOSASIH Mar 19, 2026
77aa112
Create main.py
KOSASIH Mar 19, 2026
191c992
Create dashboard.html
KOSASIH Mar 19, 2026
4a9457a
Create metrics.py
KOSASIH Mar 19, 2026
8fda4ed
Update docker-compose.yml
KOSASIH Mar 19, 2026
34ee1e0
Update prometheus.yml
KOSASIH Mar 19, 2026
70d4457
Create main.py
KOSASIH Mar 19, 2026
1a764f8
Update Cargo.toml
KOSASIH Mar 19, 2026
2b94953
Update Dockerfile.ai-agent
KOSASIH Mar 19, 2026
d6e1569
Create main.rs
KOSASIH Mar 19, 2026
e0006b8
Create Dockerfile.pi-gateway
KOSASIH Mar 19, 2026
f28f064
Create main.rs
KOSASIH Mar 19, 2026
086f291
Create trading.rs
KOSASIH Mar 19, 2026
4b665c7
Update Cargo.toml
KOSASIH Mar 19, 2026
0ab8a16
Create mod.rs
KOSASIH Mar 19, 2026
85e1eee
Create ai_agent.rs
KOSASIH Mar 19, 2026
24e0a29
Create README.md
KOSASIH Mar 19, 2026
23f81f5
Create README.md
KOSASIH Mar 19, 2026
d16e6ab
Update README.md
KOSASIH Mar 19, 2026
110a5fd
Create package.json
KOSASIH Mar 19, 2026
720985c
Create App.tsx
KOSASIH Mar 19, 2026
34fb517
Create README.md
KOSASIH Mar 19, 2026
2771cfc
Create namespace.yml
KOSASIH Mar 19, 2026
3031321
Create redis-statefulset.yaml
KOSASIH Mar 19, 2026
1d899a7
Create pirc-deployment.yaml
KOSASIH Mar 19, 2026
07618df
Create ingress.yaml
KOSASIH Mar 19, 2026
746dd18
Create Chart.yaml
KOSASIH Mar 19, 2026
fab8a6a
Create README.md
KOSASIH Mar 19, 2026
ce10985
Rename k8s/README.md to k8s/docs/README.md
KOSASIH Mar 19, 2026
6b9d58a
Rename mobile/README.md to mobile/docs/README.md
KOSASIH Mar 19, 2026
6623ddb
Rename pirc-ai-agent/README.md to pirc-ai-agent/docs/README.md
KOSASIH Mar 19, 2026
2adc6f2
Update issue templates
KOSASIH Mar 20, 2026
bb532d9
Create build-wasm.sh
KOSASIH Mar 21, 2026
c1b79dd
Create ai-agent.js
KOSASIH Mar 21, 2026
d19b575
Create wrangler.toml
KOSASIH Mar 21, 2026
285a092
Create pirc.proto
KOSASIH Mar 21, 2026
858711b
Delete .github/ISSUE_TEMPLATE directory
KOSASIH Mar 21, 2026
2c6b794
Create pi-trading-dashboard.json
KOSASIH Mar 21, 2026
968e270
Create trade-pi.js
KOSASIH Mar 21, 2026
dda2e72
Create server.py
KOSASIH Mar 21, 2026
0ac66c7
Update pirc.proto
KOSASIH Mar 21, 2026
b20deae
Update pirc.proto
KOSASIH Mar 21, 2026
6451a2f
Update ai-agent.js
KOSASIH Mar 21, 2026
4fe20a9
Update ai-agent.js
KOSASIH Mar 21, 2026
31e0456
Create README.md
KOSASIH Mar 21, 2026
d148d6c
Update and rename ai-agent.js to ai-agent.worker.js
KOSASIH Mar 21, 2026
6f8641b
Update wrangler.toml
KOSASIH Mar 21, 2026
fd9e859
Update wrangler.toml
KOSASIH Mar 24, 2026
088994a
Update wrangler.toml
KOSASIH Mar 24, 2026
c0a809e
Create scheduler.py
KOSASIH Mar 24, 2026
06c6ec1
Create fsm.py
KOSASIH Mar 24, 2026
bf760d0
Create pipeline.py
KOSASIH Mar 24, 2026
0c99a68
Update pyproject.toml
KOSASIH Mar 24, 2026
95f5771
Create __main__.py
KOSASIH Mar 24, 2026
f426601
Create client.py
KOSASIH Mar 24, 2026
7869ea7
Create server.py
KOSASIH Mar 24, 2026
3f1b763
Create release.yml
KOSASIH Mar 24, 2026
be48c72
Create .pre-commit-config.yaml
KOSASIH Mar 24, 2026
3ef305a
Update ReadMe.md
KOSASIH Mar 24, 2026
373f43c
Update ReadMe.md
KOSASIH Mar 24, 2026
6e65ef7
Create core.py
KOSASIH Mar 24, 2026
69c3556
Create hello_pirc.py
KOSASIH Mar 24, 2026
a821765
Create motors.py
KOSASIH Mar 24, 2026
1cc6715
Create api.py
KOSASIH Mar 24, 2026
1f90193
Update __init__.py
KOSASIH Mar 24, 2026
1bab2de
Update pyproject.toml
KOSASIH Mar 24, 2026
2a26116
Update pyproject.toml
KOSASIH Apr 9, 2026
899d7da
Update pyproject.toml
KOSASIH Apr 9, 2026
f33acbc
Create build.sh
KOSASIH Apr 9, 2026
6235d58
Create config-6.8-rt-arm64
KOSASIH Apr 9, 2026
36f8c2f
Create pirc-vision.service
KOSASIH Apr 9, 2026
8265248
Create docker-compose.yml
KOSASIH Apr 9, 2026
ac2a7b9
Create pirc-os-install.sh
KOSASIH Apr 9, 2026
076f7be
Create config.txt
KOSASIH Apr 9, 2026
22400e0
Create setup.sh
KOSASIH Apr 9, 2026
0eafdd1
Create Dockerfile.pirc-os
KOSASIH Apr 9, 2026
657f9ff
Update config.txt
KOSASIH Apr 9, 2026
8735721
Update config.txt
KOSASIH Apr 9, 2026
964f123
Update config.txt
KOSASIH Apr 9, 2026
64c7aae
Update config.txt
KOSASIH Apr 9, 2026
eb09aeb
Create README.md
KOSASIH Apr 9, 2026
3a9d777
Update README.md
KOSASIH Apr 9, 2026
bbdf9f4
Create Dockerfile
KOSASIH Apr 9, 2026
3f60e86
Create requirements.txt
KOSASIH Apr 9, 2026
dcc5f71
Create main.py
KOSASIH Apr 9, 2026
ac22d38
Create yolo10.py
KOSASIH Apr 9, 2026
f3831aa
Create rt-detr.py
KOSASIH Apr 9, 2026
c313ffc
Create depthai-pipeline.py
KOSASIH Apr 9, 2026
6dfdc48
Create orb_slam3.py
KOSASIH Apr 9, 2026
963422c
Create config.yaml
KOSASIH Apr 9, 2026
138f86d
Rename depthai-pipeline.py to depthai_pipeline.py
KOSASIH Apr 9, 2026
1c0cb76
Create docker-compose.yml
KOSASIH Apr 9, 2026
ead7adf
Rename rt-detr.py to rt_detr.py
KOSASIH Apr 9, 2026
77ec28d
Create README.md
KOSASIH Apr 9, 2026
ad011ad
Create Dockerfile
KOSASIH Apr 10, 2026
c3fce27
Create requirements.txt
KOSASIH Apr 10, 2026
d0cf434
Create navigation_launch.py
KOSASIH Apr 10, 2026
9ce89c9
Create casadi_mpc.py
KOSASIH Apr 10, 2026
d48db6e
Create bt_navigator.py
KOSASIH Apr 10, 2026
41654b9
Create sbpl_planer.py
KOSASIH Apr 10, 2026
1e5fe39
Create rplidar_a3.py
KOSASIH Apr 10, 2026
724a2fc
Create nav2_params.yaml
KOSASIH Apr 10, 2026
fa38b3d
Create docker-compose.yml
KOSASIH Apr 10, 2026
fbf8167
Create Dockerfile
KOSASIH Apr 10, 2026
6a2e434
Create package.json
KOSASIH Apr 10, 2026
4f0d49b
Create index.html
KOSASIH Apr 10, 2026
79b07bb
Create App.jsx
KOSASIH Apr 10, 2026
4ace68e
Create Robot3D.jsx
KOSASIH Apr 10, 2026
24037c0
Create VideoStream.jsx
KOSASIH Apr 10, 2026
ea6d18e
Create Teleop.jsx
KOSASIH Apr 10, 2026
3e74e55
Create MissionPlanner.jsx
KOSASIH Apr 10, 2026
570154d
Create useROS.js
KOSASIH Apr 10, 2026
174ba0a
Create server.js
KOSASIH Apr 10, 2026
ba3ab55
Create docker-compose.yml
KOSASIH Apr 10, 2026
9fa5eaa
Create Dockerfile
KOSASIH Apr 10, 2026
e4e8b4b
Create requirements.txt
KOSASIH Apr 10, 2026
61770c8
Create train.py
KOSASIH Apr 10, 2026
00a37b2
Create ray_tune.py
KOSASIH Apr 10, 2026
4f0c4ea
Create optuna_sweep.py
KOSASIH Apr 10, 2026
bd34dfc
Create roboflow_manager.py
KOSASIH Apr 10, 2026
629469a
Create download_models.py
KOSASIH Apr 10, 2026
c5d795f
Create yolo10.yaml
KOSASIH Apr 10, 2026
b282e3d
Create docker-compose.yml
KOSASIH Apr 10, 2026
6198471
Update download_models.py
KOSASIH Apr 10, 2026
174c7e4
Update download_models.py
KOSASIH Apr 10, 2026
4b0c2b9
Create Dockerfile
KOSASIH Apr 10, 2026
e619f5d
Create requirements.txt
KOSASIH Apr 10, 2026
ee1f1a0
Create motors.py
KOSASIH Apr 10, 2026
5ed19c6
Create imu_xkf.py
KOSASIH Apr 10, 2026
fe29961
Create power.py
KOSASIH Apr 10, 2026
0acdb97
Create can_bus.py
KOSASIH Apr 10, 2026
53f16b4
Create pirc_hal_node.py
KOSASIH Apr 10, 2026
2fb3cc8
Create motor_config.yaml
KOSASIH Apr 10, 2026
efd20e1
Create docker-compose.yml
KOSASIH Apr 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# .github/workflows/release.yml
name: Release
on:
push:
tags: ['v*']
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- run: poetry build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_TOKEN }}
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .pre-commit-config.yaml
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.5
hooks:
- id: ruff
- id: ruff-format
88 changes: 88 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
[package]
name = "pirc-ai-suite"
version = "2.0.1"
edition = "2021"
authors = ["KOSASIH <kosasihg88@gmail.com>"]
description = "🚀 PiRC AI Suite - Autonomous IRC + Pi Trading Bot"
license = "MIT"
repository = "https://github.com/KOSASIH/PiRC"
keywords = ["irc", "ai", "pi-network", "trading", "rust"]
categories = ["networking", "cryptography::cryptocurrencies"]

[dependencies]
# 🎯 Async Runtime
tokio = { version = "1.36", features = ["full"] }
tokio-tungstenite = "0.23"
futures = "0.3"
futures-util = "0.3"

# 📦 Serialization
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

# 🌐 HTTP + WebSocket
reqwest = { version = "0.12", features = ["json", "rustls-tls", "stream"] }
axum = "0.7"
tower = "0.4"
tower-http = { version = "0.5", features = ["cors", "trace", "fs"] }

# 🧠 AI + Vector DB
qdrant-client = "0.13"
candle-core = "0.3" # ONNX/LLM inference
candle-nn = "0.3"
tokenizers = "0.19"

# 💰 Pi Network + Crypto
bitcoin = { version = "0.31", features = ["rand-std"] }
secp256k1 = { version = "0.28", features = ["rand-std", "recovery"] }
pi-network = "0.2" # Pi SDK
hex = "0.4"

# 🗄️ Databases
redis = { version = "0.25", features = ["tokio-comp", "connection-manager"] }
sqlx = { version = "0.7", features = ["runtime-tokio-rustls", "sqlite", "uuid", "chrono"] }

# 📊 Metrics + Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json", "tracing-log"] }
prometheus = { version = "0.13", features = ["nightly"] }
metrics = "0.22"

# 🛠️ Utilities
thiserror = "1.0"
anyhow = "1.0"
clap = { version = "4.5", features = ["derive", "env"] }
uuid = { version = "1.7", features = ["v4", "serde", "fast"] }
lazy_static = "1.4"
chrono = { version = "0.4", features = ["serde"] }
rand = "0.8"
base64 = "0.22"

# 🔒 Security
ring = "0.17"
zeroize = "1.8"

[dependencies.webpki-roots]
version = "0.26"
features = ["rustls"]

[dev-dependencies]
tokio-test = "0.4"
mockall = "0.13"

[features]
default = ["ai"]
ai = ["candle-core", "candle-nn", "tokenizers"]
pi-network = ["pi-network", "bitcoin", "secp256k1"]
full = ["ai", "pi-network"]

[profile.release]
lto = true
codegen-units = 1
panic = "abort"
overflow-checks = false

[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM python:3.11-slim@sha256:6d99c8d7a5b6f9c5a8b8c8d7a5b6f9c5a8b8c8d7a5b6f9c5a8b8c8d7a5b6f9c5 as base

# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libffi-dev \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app

# Create non-root user
RUN addgroup --system --gid 1001 pirc && \
adduser --system --uid 1001 --ingroup pirc pirc

# Copy pyproject.toml and poetry.lock first
COPY --chown=pirc:pirc pyproject.toml poetry.lock* ./

# Install dependencies
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir poetry==1.8.2 && \
poetry config virtualenvs.create false && \
poetry install --no-dev --no-interaction --no-ansi && \
poetry cache clear --no-interaction pypi && \
rm -rf ~/.cache

# Copy source code
COPY --chown=pirc:pirc src/ ./src/

# Create runtime directories
RUN mkdir -p /app/data /app/logs && \
chown -R pirc:pirc /app

USER pirc

# Healthcheck
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD python -c "import redis.asyncio; redis.asyncio.from_url('redis://localhost').ping()"

EXPOSE 8080 9090
CMD ["python", "-m", "pirc.main"]
31 changes: 31 additions & 0 deletions Dockerfile.ai-agent
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Multi-stage build for Raspberry Pi + x86
FROM --platform=$BUILDPLATFORM rust:1.75-slim as builder

WORKDIR /app
COPY Cargo.toml Cargo.lock ./

# Cache dependencies
RUN mkdir src && echo "fn main(){}" > src/main.rs
RUN cargo build --release
RUN rm -rf src

# Copy source
COPY src ./src
COPY models ./models

# Build final binary
RUN cargo build --release

# Production image
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=builder /app/target/release/pirc-ai-agent /usr/local/bin/
COPY models ./models

EXPOSE 8081
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:8081/health || exit 1

CMD ["pirc-ai-agent"]
93 changes: 93 additions & 0 deletions Dockerfile.dashboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# ============================================================================
# PiRC AI Dashboard - Multi-stage Production Dockerfile
# Optimized for size, speed, and security
# ============================================================================

# ─── STAGE 1: CARGO CACHE & DEPENDENCIES ───
FROM rust:1.76-slim as cargo-cache
WORKDIR /app
RUN rustup default stable && rustup update

# Copy workspace files for dependency caching
COPY Cargo.toml Cargo.lock ./
COPY pirc-dashboard/Cargo.toml ./pirc-dashboard/
COPY pirc-ai-agent/Cargo.toml ./pirc-ai-agent/
COPY pirc-edge-ai/Cargo.toml ./pirc-edge-ai/
COPY pirc-pi-super/Cargo.toml ./pirc-pi-super/

# Pre-download dependencies (cache hit!)
RUN mkdir -p pirc-dashboard/src pirc-ai-agent/src pirc-edge-ai/src pirc-pi-super/src && \
cargo build --release --workspace && \
cargo clean -p pirc-ai-agent pirc-edge-ai pirc-pi-super

# ─── STAGE 2: BUILDER ───
FROM rust:1.76-slim as builder
WORKDIR /app

# Copy cached dependencies
COPY --from=cargo-cache /app/target /app/target
COPY --from=cargo-cache /usr/local/cargo /usr/local/cargo

# Copy source code
COPY pirc-dashboard ./pirc-dashboard
COPY pirc-ai-agent ./pirc-ai-agent
COPY pirc-edge-ai ./pirc-edge-ai
COPY pirc-pi-super ./pirc-pi-super
COPY Cargo.toml Cargo.lock ./

# Build with optimizations
RUN cargo build \
--release \
--package pirc-dashboard \
--features production,dashboard \
--bin pirc-dashboard && \
cargo clean

# ─── STAGE 3: PRODUCTION RUNTIME ───
FROM debian:bookworm-slim as production

# Install minimal runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ca-certificates \
libssl3 \
fontconfig \
freetype \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Create non-root user
RUN groupadd -r pirc --gid=1001 && \
useradd -r -g pirc --uid=1001 pirc && \
mkdir -p /app /data /models && \
chown -R pirc:pirc /app /data /models

WORKDIR /app

# Copy binary from builder
COPY --from=builder --chown=pirc:pirc /app/target/release/pirc-dashboard ./

# Copy static assets
COPY --chown=pirc:pirc pirc-dashboard/static ./static
COPY --chown=pirc:pirc pirc-dashboard/templates ./templates

# ─── HEALTHCHECK & EXPOSE ───
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=10s --start-period=20s --retries=3 \
CMD curl -f http://localhost:8080/health || exit 1

# ─── SECURITY & RUNTIME ───
USER pirc
ENV RUST_LOG=info
ENV RUST_BACKTRACE=1
ENV DATABASE_URL=sqlite:///data/dashboard.db

# Pre-warm models directory
VOLUME ["/models", "/data"]

# Graceful shutdown
STOPSIGNAL SIGTERM

# Production entrypoint
CMD ["/app/pirc-dashboard"]
31 changes: 31 additions & 0 deletions Dockerfile.pi-gateway
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM --platform=$BUILDPLATFORM rust:1.75-slim as builder

WORKDIR /app
COPY Cargo.toml Cargo.lock ./

# Cache deps
RUN mkdir src && echo "fn main(){}" > src/main.rs
RUN cargo build --release
RUN rm src/main.rs

COPY src ./src
COPY models ./models

# Build with Pi Network optimizations
RUN cargo build --release --features pi-network

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates curl && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY --from=builder /app/target/release/pirc-pi-gateway /usr/local/bin/
COPY models ./models

# SQLite DB
VOLUME /app/data

EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=10s --start-period=10s --retries=3 \
CMD curl -f http://localhost:3000/health || exit 1

CMD ["pirc-pi-gateway"]
22 changes: 22 additions & 0 deletions Dockerfile.pirc-os
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM ubuntu:24.04

# PiRC-OS Docker Base
RUN apt update && apt install -y \
linux-image-rt-arm64 \
ros-humble-desktop \
python3-pip \
docker.io \
libcamera0 \
wiringpi \
i2c-tools \
&& rm -rf /var/lib/apt/lists/*

# Pre-install PiRC stack
RUN pip3 install torch==2.1.0 \
ultralytics \
opencv-python \
rclpy \
sensor-msgs

COPY rootfs/ /
CMD ["/sbin/init"]
23 changes: 23 additions & 0 deletions Dockerfile.rust-builder
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM rust:1.76-slim as builder
WORKDIR /app

# Cache cargo registry
RUN rustup default stable && rustup update

# Copy workspace
COPY Cargo.toml Cargo.lock ./
COPY pirc-*/Cargo.toml ./pirc-*/

# Cache dependencies
RUN cargo build --workspace --release

# Build final binaries
COPY . .
RUN cargo build --release --bin pirc-dashboard --bin pirc-ai-agent --bin pirc-pi-gateway --bin pirc-ops-dashboard

FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates libssl-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/pirc-* ./
EXPOSE 8080 3000 9090
CMD ["sh", "-c", "sleep 5 && ./pirc-dashboard"]
Loading