-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile_devnet
More file actions
79 lines (64 loc) · 2.51 KB
/
Dockerfile_devnet
File metadata and controls
79 lines (64 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Base image: CPU by default, override with --build-arg BASE_IMAGE=ratio1/base_edge_node_amd64_gpu:latest for GPU
# The base image provides: Python 3.13, PyTorch, FFmpeg, Docker Engine (DIND), Node.js, uv, and ML/data stack
ARG BASE_IMAGE=ratio1/base_edge_node_amd64_cpu:latest
FROM ${BASE_IMAGE}
# Install IPFS (Kubo) — needed for R1FS decentralized file system
ARG KUBO_VERSION=v0.35.0
RUN set -eux; \
curl -fsSLo kubo.tar.gz https://dist.ipfs.tech/kubo/${KUBO_VERSION}/kubo_${KUBO_VERSION}_linux-amd64.tar.gz; \
tar -xzf kubo.tar.gz; \
cd kubo && bash install.sh; \
cd / && rm -rf kubo kubo.tar.gz
# Install Cloudflared — tunnel engine for exposing webapp endpoints
ARG CLOUDFLARED_VERSION=2025.7.0
RUN set -eux; \
arch="$(uname -m)"; \
case "$arch" in \
x86_64) arch=amd64 ;; \
aarch64 | arm64) arch=arm64 ;; \
armv7l) arch=armv7 ;; \
*) echo "Unsupported arch: $arch" >&2; exit 1 ;; \
esac; \
curl -L "https://github.com/cloudflare/cloudflared/releases/download/${CLOUDFLARED_VERSION}/cloudflared-linux-${arch}" \
-o /usr/local/bin/cloudflared; \
chmod +x /usr/local/bin/cloudflared; \
cloudflared --version
COPY ./cmds /usr/local/bin/
RUN chmod +x /usr/local/bin/*
WORKDIR /edge_node
COPY . .
RUN rm -rf /edge_node/cmds
# set a generic env variable
ENV AINODE_DOCKER=Yes
# set a generic env variable
ENV AINODE_DOCKER_SOURCE=develop
# enable Docker-in-Docker in the optional base-image entrypoint
ENV EE_DD=1
# set default Execution Engine id
ENV EE_ID=E2dkr
# Temporary fix:
ENV AINODE_ENV=$AI_ENV
ENV AINODE_ENV_VER=$AI_ENV_VER
# configure default config_startup file
ENV EE_CONFIG=.config_startup.json
ENV EE_ETH_ENABLED=true
ENV EE_HB_CONTAINS_PIPELINES=0
ENV EE_HB_CONTAINS_ACTIVE_PLUGINS=1
ENV EE_EPOCH_MANAGER_DEBUG=1
ENV EE_NETMON_ADDRESS_INDEX=true
ENV EE_NETMON_SEND_CURRENT_NETWORK_EACH=50
ENV EE_NETMON_SEND_ONLY_ONLINE=true
ENV EE_EVM_NET=devnet
ENV EE_DEBUG_R1FS=true
#### TO BE REMOVED AND TESTED !!!
# ENV TZ=Europe/Bucharest
# RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#### END TO BE REMOVED
# also can use EE_DEVICE to define target such as cuda:0 or cuda:1 instead of cpu
# althouh this is not recommended as it should be in .env file
# ENV EE_DEVICE=cuda:0
RUN uv pip install --system --no-cache -r requirements.txt
RUN uv pip install --system --no-cache --no-deps naeural-core
#RUN pip install --no-cache-dir -r requirements.txt
#RUN pip install --no-cache-dir --no-deps naeural-core
CMD ["python3","device.py"]