1- # -d for dind
2- FROM ratio1/base_edge_node:x86_64-py3.10.12-th2.3.1.cu121-tr4.43.3-dnctk
3- #FROM aidamian/base_edge_node:x86_64-py3.10.12-th2.3.1.cu121-tr4.43.3-d
1+ # Base image: CPU by default, override with --build-arg BASE_IMAGE=ratio1/base_edge_node_amd64_gpu:latest for GPU
2+ # The base image provides: Python 3.13, PyTorch, FFmpeg, Docker Engine (DIND), Node.js, uv, and ML/data stack
3+ ARG BASE_IMAGE=ratio1/base_edge_node_amd64_cpu:latest
4+ FROM ${BASE_IMAGE}
45
5- # Install IPFS
6- # The line below was creating issues due to flaky external repos
7- # RUN apt-get update && apt-get install -y wget && apt-get install -y tar
8- # Install tools needed for the next steps without hitting flaky external repos
6+ # Install IPFS (Kubo) — needed for R1FS decentralized file system
7+ ARG KUBO_VERSION=v0.35.0
98RUN set -eux; \
10- # disable NodeSource (if present) so apt won't read it
11- rm -f /etc/apt/sources.list.d/nodesource*.list /etc/apt/sources.list.d/nodesource*.sources || true; \
12- apt-get update -o Acquire::Retries=3; \
13- DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
14- wget tar ca-certificates \
15- ninja-build; \
16- rm -rf /var/lib/apt/lists/*
17-
18- RUN wget https://dist.ipfs.tech/kubo/v0.35.0/kubo_v0.35.0_linux-amd64.tar.gz && \
19- tar -xvzf kubo_v0.35.0_linux-amd64.tar.gz && \
20- cd kubo && \
21- bash install.sh
22- # End Install IPFS
9+ curl -fsSLo kubo.tar.gz https://dist.ipfs.tech/kubo/${KUBO_VERSION}/kubo_${KUBO_VERSION}_linux-amd64.tar.gz; \
10+ tar -xzf kubo.tar.gz; \
11+ cd kubo && bash install.sh; \
12+ cd / && rm -rf kubo kubo.tar.gz
2313
24- # Install Cloudflared
14+ # Install Cloudflared — tunnel engine for exposing webapp endpoints
2515ARG CLOUDFLARED_VERSION=2025.7.0
26-
2716RUN set -eux; \
28- # --- map architecture names to Cloudflare’s file names -------
29- arch="$(uname -m)"; \
30- case "$arch" in \
31- x86_64) arch=amd64 ;; \
32- aarch64 | arm64) arch=arm64 ;; \
33- armv7l) arch=armv7 ;; \
17+ arch="$(uname -m)"; \
18+ case "$arch" in \
19+ x86_64) arch=amd64 ;; \
20+ aarch64 | arm64) arch=arm64 ;; \
21+ armv7l) arch=armv7 ;; \
3422 *) echo "Unsupported arch: $arch" >&2; exit 1 ;; \
35- esac; \
36- # --- download the pinned release --------------------------------
23+ esac; \
3724 curl -L "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-${arch}" \
38- -o /usr/local/bin/cloudflared; \
39- chmod +x /usr/local/bin/cloudflared; \
40- # --- (optional) show version so it appears in build logs --------
25+ -o /usr/local/bin/cloudflared; \
26+ chmod +x /usr/local/bin/cloudflared; \
4127 cloudflared --version
42- # End Install Cloudflared
4328
4429COPY ./cmds /usr/local/bin/
4530RUN chmod +x /usr/local/bin/*
@@ -53,6 +38,8 @@ RUN rm -rf /edge_node/cmds
5338ENV AINODE_DOCKER=Yes
5439# set a generic env variable
5540ENV AINODE_DOCKER_SOURCE=develop
41+ # enable Docker-in-Docker in the optional base-image entrypoint
42+ ENV EE_DD=1
5643# set default Execution Engine id
5744ENV EE_ID=E2dkr
5845# Temporary fix:
@@ -84,10 +71,9 @@ ENV EE_DEBUG_R1FS=true
8471# althouh this is not recommended as it should be in .env file
8572# ENV EE_DEVICE=cuda:0
8673
87- # to avoid issues with hnswlib and building from source
88- ENV HNSWLIB_NO_NATIVE=1
89-
90- RUN pip install --no-cache-dir -r requirements.txt
91- RUN pip install --no-cache-dir --no-deps naeural-core
74+ RUN uv pip install --system --no-cache -r requirements.txt
75+ RUN uv pip install --system --no-cache --no-deps naeural-core
76+ #RUN pip install --no-cache-dir -r requirements.txt
77+ #RUN pip install --no-cache-dir --no-deps naeural-core
9278
9379CMD ["python3","device.py"]
0 commit comments