Spaces:
Sleeping
Sleeping
Fix deployment for PIXEL
Browse files- Dockerfile +9 -17
- README.md +1 -6
- config.json +4 -8
Dockerfile
CHANGED
|
@@ -1,26 +1,18 @@
|
|
| 1 |
-
FROM
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN apk add --no-cache ca-certificates curl iptables ip6tables iproute2 bash
|
| 5 |
-
|
| 6 |
-
# Install Tailscale
|
| 7 |
-
RUN curl -fsSL https://pkgs.tailscale.com/stable/tailscale_1.56.1_amd64.tgz | tar xz -C /usr/local/bin --strip-components=1
|
| 8 |
-
|
| 9 |
-
# Create user
|
| 10 |
-
RUN adduser -D -u 1000 megamind
|
| 11 |
-
RUN mkdir -p /app/data /var/run/tailscale /var/lib/tailscale
|
| 12 |
-
RUN chown -R megamind:megamind /app /var/run/tailscale /var/lib/tailscale
|
| 13 |
|
|
|
|
| 14 |
WORKDIR /app
|
|
|
|
| 15 |
|
| 16 |
-
# Copy binary and config
|
| 17 |
COPY megamind /app/megamind
|
| 18 |
COPY config.json /app/config.json
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
# HF Spaces uses port 7860
|
| 24 |
EXPOSE 7860
|
| 25 |
|
| 26 |
-
CMD
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
+
RUN useradd -m -u 1000 megamind
|
| 6 |
WORKDIR /app
|
| 7 |
+
RUN mkdir -p /app/data && chown -R megamind:megamind /app
|
| 8 |
|
|
|
|
| 9 |
COPY megamind /app/megamind
|
| 10 |
COPY config.json /app/config.json
|
| 11 |
+
RUN chmod +x /app/megamind
|
| 12 |
|
| 13 |
+
USER megamind
|
|
|
|
|
|
|
| 14 |
EXPOSE 7860
|
| 15 |
|
| 16 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 CMD curl -sf http://localhost:7860/health || exit 1
|
| 17 |
+
|
| 18 |
+
CMD ["/app/megamind", "-port", "7860", "-data", "/app/data"]
|
README.md
CHANGED
|
@@ -8,9 +8,4 @@ pinned: false
|
|
| 8 |
---
|
| 9 |
|
| 10 |
# MEGAMIND PIXEL
|
| 11 |
-
|
| 12 |
-
Part of the MEGAMIND distributed AGI federation.
|
| 13 |
-
|
| 14 |
-
**Specialty:** image processing
|
| 15 |
-
|
| 16 |
-
This mind connects to the federation via NATS and contributes to collective intelligence queries.
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
# MEGAMIND PIXEL
|
| 11 |
+
Specialty: image processing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
| 1 |
{
|
| 2 |
"name": "PIXEL",
|
| 3 |
-
"
|
| 4 |
-
"neurons":
|
| 5 |
"federation": {
|
| 6 |
-
"enabled":
|
| 7 |
-
|
| 8 |
-
"nats_url": "nats://100.115.192.101:4222"
|
| 9 |
-
},
|
| 10 |
-
"seed_urls": [],
|
| 11 |
-
"specialty": "image processing"
|
| 12 |
}
|
|
|
|
| 1 |
{
|
| 2 |
"name": "PIXEL",
|
| 3 |
+
"specialty": "image processing",
|
| 4 |
+
"neurons": 512,
|
| 5 |
"federation": {
|
| 6 |
+
"enabled": false
|
| 7 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
}
|