$GOURDES miner in Docker (Linux)
================================

This is the build context of the miner image: the Dockerfile and the miner files served at
https://gourdes.finance/miner/ (byte for byte; check them against SHA256SUMS there).

Build
  docker build -t gourdes-miner https://gourdes.finance/miner/gourdes-miner-docker.tar.gz

Set up once (asks for the mining wallet key with hidden typing, the Base endpoint and the devices)
  mkdir -m 700 gourdes-data
  docker run -it --rm --gpus all --user "$(id -u):$(id -g)" -v "$PWD/gourdes-data:/data" gourdes-miner setup

Test run (sends nothing, prints the solutions it finds; Ctrl+C to stop)
  docker run -it --rm --gpus all --user "$(id -u):$(id -g)" -v "$PWD/gourdes-data:/data" gourdes-miner test

Mine
  docker run -d --name gourdes-miner --gpus all --user "$(id -u):$(id -g)" -v "$PWD/gourdes-data:/data" gourdes-miner mine
  docker logs -f gourdes-miner        # watch it
  docker stop gourdes-miner           # stop it

Notes
  - NVIDIA cards need the NVIDIA driver and the NVIDIA Container Toolkit on the host (that is what
    --gpus all uses). Without a graphics card, leave out --gpus all: the image includes PoCL, an
    OpenCL driver for the processor, and setup offers it as a device.
  - Run as your own user (--user) so the key file in gourdes-data stays yours and mode 600.
  - Everything the miner writes is in gourdes-data: settings.json, config.json, keys/hot.key,
    status.line and STOP. If a safety limit trips, the miner writes the reason to STOP and will not
    start again until you delete that file.
  - Other devices or options: edit gourdes-data/settings.json, or run setup again. `list` and `bench`
    show the devices and their speed.
