YoRyan / nuxhash

A NiceHash cryptocurrency mining client for Linux.
GNU General Public License v3.0
264 stars 164 forks source link

Docker? #79

Closed kylrth closed 2 years ago

kylrth commented 3 years ago

It'd be cool if there were a Docker image. Then for GPU setups it'd be as easy as using the nvidia container runtime with docker-compose.

metajiji commented 3 years ago

This is simple, just try this

FROM python:3

WORKDIR /nuxhash

ENV PATH=/nuxhash/venv/bin:$PATH

ENV NUXHASH_VERSION=v1.0.0b2
RUN python3 -m venv venv \
    && . venv/bin/activate \
    && pip install --no-cache-dir \
        git+https://github.com/YoRyan/nuxhash@$NUXHASH_VERSION \
    && mkdir -p .config/nuxhash \
\
# Workaround and this should be fixed in code later
    && echo '{}' > benchmarks.json \
    && touch settings.conf
---

version: '3.9'

services:
  nuxhash:
    build: .
    command: nuxhashd -c ./
docker-compose build
docker-compose run --rm nuxhash nuxhashd -c ./
docker-compose up -d