From e226071c2036d679bceaf68c170c8a78b78ba5a5 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Fri, 8 Nov 2019 08:43:23 -0800 Subject: [PATCH] disable GPU by default --- cmd/lotus-storage-miner/run.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/lotus-storage-miner/run.go b/cmd/lotus-storage-miner/run.go index 4142233fd..c8a10baac 100644 --- a/cmd/lotus-storage-miner/run.go +++ b/cmd/lotus-storage-miner/run.go @@ -31,12 +31,20 @@ var runCmd = &cli.Command{ Name: "api", Value: "2345", }, + &cli.BoolFlag{ + Name: "enable-gpu-proving", + Usage: "Enable use of GPU for mining operations", + }, }, Action: func(cctx *cli.Context) error { if err := build.GetParams(true); err != nil { return xerrors.Errorf("fetching proof parameters: %w", err) } + if !cctx.Bool("enable-gpu-proving") { + os.Setenv("BELLMAN_NO_GPU", "true") + } + nodeApi, ncloser, err := lcli.GetFullNodeAPI(cctx) if err != nil { return err