Skip to content

Commit 27a8274

Browse files
authored
Update README.md
add docker usage info
1 parent e4d9c9c commit 27a8274

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

README.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,91 @@ Plot Sink is a tool to receive plots over the network and copy them to multiple
166166
You can find binaries in [plot-sink](https://github.com/madMAx43v3r/chia-gigahorse/tree/master/plot-sink)
167167

168168
See also the open source repository: https://github.com/madMAx43v3r/chia-plot-sink
169+
170+
## Docker Usage
171+
172+
The Dockerfile file uses multiple build stages to support 3 different applications CPU-Only, AMD-GPU, NVIDIA-GPU.
173+
174+
Each image provides a volume for `/data` which you can override with your own volume or a mapped path to customize the storage location of the node data.
175+
176+
The default behavior of the container is to look in `/data` for an existing db/config and use it. Otherwise it will generate a fresh config and start syncing the node from scratch.
177+
178+
You can set which services to run with the `CHIA_SERVICES` environment variable.
179+
180+
Docker Run Examples:
181+
```
182+
-e CHIA_SERVICES="harvester"
183+
-e CHIA_SERVICES="node farmer-only"
184+
-e CHIA_SERVICES="node farmer-only wallet"
185+
```
186+
Docker Compose Examples:
187+
```yml
188+
environment:
189+
- CHIA_SERVICES="harvester"
190+
191+
environment:
192+
- CHIA_SERVICES="node farmer-only"
193+
194+
environment:
195+
- CHIA_SERVICES="node farmer-only wallet"
196+
```
197+
198+
### CPU-Only
199+
200+
Docker Run Example:
201+
202+
`docker run --rm -it -v /path/to/.chia:/data chia-gigahorse`
203+
204+
Docker Compose Example:
205+
```yml
206+
version: '3'
207+
services:
208+
node:
209+
image: chia-gigahorse
210+
restart: unless-stopped
211+
volumes:
212+
- /path/to/.chia:/data
213+
```
214+
215+
### AMD-GPU
216+
217+
Docker Run Example:
218+
219+
`docker run --rm -it --device=/dev/kfd --device=/dev/dri --group-add video --group-add render -v /path/to/.chia:/data chia-gigahorse-amd`
220+
221+
Docker Compose Example:
222+
```yml
223+
version: '3'
224+
services:
225+
node:
226+
image: chia-gigahorse-amd
227+
restart: unless-stopped
228+
group_add:
229+
- video
230+
- render
231+
devices:
232+
- /dev/dri:/dev/dri
233+
- /dev/kfd:/dev/kfd
234+
volumes:
235+
- /path/to/.chia:/data
236+
```
237+
Note: `- render` in `group_add` might need to be removed, depending on your system.
238+
239+
### NVIDIA-GPU
240+
241+
Docker Run Example:
242+
243+
`docker run --rm -it --runtime=nvidia -v /path/to/.chia:/data chia-gigahorse-nvidia`
244+
245+
Docker Compose Example:
246+
```yml
247+
version: '3'
248+
services:
249+
node:
250+
image: chia-gigahorse-nvidia
251+
restart: unless-stopped
252+
runtime: nvidia
253+
volumes:
254+
- /path/to/.chia:/data
255+
```
256+
Note: for nvidia you also need the `NVIDIA Container Toolkit` installed on the host, for more info please see: https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker

0 commit comments

Comments
 (0)