forked from SatoriNetwork/Neuron
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-dev
More file actions
118 lines (103 loc) · 5.39 KB
/
Dockerfile-dev
File metadata and controls
118 lines (103 loc) · 5.39 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# copy to and run from ../ or C:\repos\Satori
# (updating process is the only thing that requires git)
# (vim for troubleshooting)
# python:slim will eventually fail, if we need to revert try this:
# FROM python:slim3.12.0b1-slim
FROM python:3.9-slim
RUN apt-get update && \
apt-get install -y build-essential && \
apt-get install -y wget && \
apt-get install -y git && \
apt-get install -y vim && \
# for making python-evrmorelib
apt-get install -y cmake && \
apt-get clean
# ipfs - unused
#RUN wget https://dist.ipfs.tech/kubo/v0.21.0/kubo_v0.21.0_linux-amd64.tar.gz
#RUN tar -xvzf kubo_v0.21.0_linux-amd64.tar.gz
#RUN cd kubo && bash install.sh
# has no effect, we put it in the run command
#RUN echo "IPFS_PATH=/Satori/Neuron/config/ipfs" >> /etc/environment
#RUN echo "source /etc/environment" >> ~/.bashrc
# echo $IPFS_PATH
# RUN ipfs init # do not init. it will be initialized by the node, so that each container has a unique ID.
# todo: maybe just move all this to the code part.
RUN mkdir /Satori
# RUN mkdir /Satori/Synapse
# RUN mkdir /Satori/Lib
# RUN mkdir /Satori/Wallet
# RUN mkdir /Satori/Engine
# RUN mkdir /Satori/Neuron
# RUN mkdir /Satori/Neuron/data
# RUN mkdir /Satori/Neuron/models
# RUN mkdir /Satori/Neuron/wallet
# RUN mkdir /Satori/Neuron/config
# RUN mkdir /Satori/Neuron/uploaded
# RUN mkdir /Satori/Neuron/predictions
# COPY Synapse/satorisynapse /Satori/Synapse/satorisynapse
# COPY Synapse/setup.py /Satori/Synapse/setup.py
# COPY Synapse/requirements.txt /Satori/Synapse/requirements.txt
# COPY Lib/satorilib /Satori/Lib/satorilib
# COPY Lib/setup.py /Satori/Lib/setup.py
# COPY Lib/requirements.txt /Satori/Lib/requirements.txt
# COPY Wallet/satoriwallet /Satori/Wallet/satoriwallet
# COPY Wallet/reqs /Satori/Wallet/reqs
# COPY Wallet/setup.py /Satori/Wallet/setup.py
# COPY Wallet/requirements.txt /Satori/Wallet/requirements.txt
# COPY Engine/satoriengine /Satori/Engine/satoriengine
# COPY Engine/setup.py /Satori/Engine/setup.py
# COPY Engine/requirements.txt /Satori/Engine/requirements.txt
# COPY Neuron/satorineuron/ /Satori/Neuron/satorineuron/
# COPY Neuron/config/config.yaml /Satori/Neuron/config/config.yaml
# COPY Neuron/setup.py /Satori/Neuron/setup.py
# COPY Neuron/requirements.txt /Satori/Neuron/requirements.txt
# RUN chmod -R 777 /Satori/Synapse
# RUN chmod -R 777 /Satori/Lib
# RUN chmod -R 777 /Satori/Wallet
# RUN chmod -R 777 /Satori/Engine
# RUN chmod -R 777 /Satori/Neuron
RUN cd /Satori && git clone -b dev https://github.com/SatoriNetwork/Synapse.git && \
cd /Satori && git clone -b dev https://github.com/SatoriNetwork/Lib.git && \
cd /Satori && git clone -b dev https://github.com/SatoriNetwork/Wallet.git && \
cd /Satori && git clone -b dev https://github.com/SatoriNetwork/Engine.git && \
cd /Satori && git clone https://github.com/amazon-science/chronos-forecasting.git && \
cd /Satori && git clone https://github.com/ibm-granite/granite-tsfm.git
RUN pip install --upgrade pip && \
pip install --no-cache-dir torch==2.3.1 && \
pip install --no-cache-dir transformers==4.41.2 && \
pip install --no-cache-dir /Satori/granite-tsfm && \
pip install --no-cache-dir /Satori/chronos-forecasting && \
cd /Satori/Synapse && pip install --no-cache-dir -r requirements.txt && python setup.py develop && \
cd /Satori/Lib && pip install --no-cache-dir -r requirements.txt && python setup.py develop && \
cd /Satori/Wallet && pip install --no-cache-dir -r requirements.txt && python setup.py develop && \
cd /Satori/Engine && pip install --no-cache-dir -r requirements.txt && python setup.py develop
# cd /Satori/Neuron && pip install --no-cache-dir -r requirements.txt && python setup.py develop
## no need for ollama at this time.
#RUN apt-get install -y curl
#RUN mkdir /Satori/Neuron/chat
#RUN cd /Satori/Neuron/chat && curl -fsSL https://ollama.com/install.sh | sh
#RUN ollama serve
#RUN ollama pull llama3
# satori ui
EXPOSE 24601
# ipfs web ui
#EXPOSE 5002
# ipfs
#EXPOSE 4001 5001 23384
#EXPOSE 3000
# WORKDIR /Satori/Neuron/satorineuron/web
#ENTRYPOINT [ "python" ]
#CMD ["python", "./app.py" ]
# BUILD PROCESS:
# copy to and run from ../ (cd ..)
# \Satori> docker build --no-cache -t satorinet/satorineuron:base .
# OR
# \Satori> docker buildx create --use
# \Satori> docker buildx build --platform linux/amd64,linux/arm64 -t satorinet/satorineuron:base --push .
# delete the base one after you push it, we just need it local
# RUN OPTIONS
# docker run --rm -it --name satorineuron -p 24601:24601 -v c:\repos\Satori\Neuron:/Satori/Neuron -v c:\repos\Satori\Synapse:/Satori/Synapse -v c:\repos\Satori\Lib:/Satori/Lib -v c:\repos\Satori\Wallet:/Satori/Wallet -v c:\repos\Satori\Engine:/Satori/Engine -e IPFS_PATH=/Satori/Neuron/config/ipfs --env ENV=local satorinet/satorineuron:base bash
# docker run --rm -it --name satorineuron -p 24601:24601 -v c:\repos\Satori\Neuron:/Satori/Neuron -v c:\repos\Satori\Synapse:/Satori/Synapse -v c:\repos\Satori\Lib:/Satori/Lib -v c:\repos\Satori\Wallet:/Satori/Wallet -v c:\repos\Satori\Engine:/Satori/Engine -e IPFS_PATH=/Satori/Neuron/config/ipfs --env ENV=prod satorinet/satorineuron:base ./start.sh
# docker run --rm -it --name satorineuron -p 24601:24601 -v c:\repos\Satori\Neuron:/Satori/Neuron -v c:\repos\Satori\Synapse:/Satori/Synapse -v c:\repos\Satori\Lib:/Satori/Lib -v c:\repos\Satori\Wallet:/Satori/Wallet -v c:\repos\Satori\Engine:/Satori/Engine satorinet/satorineuron:base bash
# docker run --rm -it --name satorineuron satorinet/satorineuron:base bash
# docker exec -it satorineuron bash