Skip to content

Commit

Permalink
Accept DEFAULT_EXECUTOR_CLASS in install_miner script
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar-reef committed Sep 2, 2024
1 parent cdc760a commit 656b2bf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions install_miner.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/bash
set -euxo pipefail

if [ $# -lt 3 ] || [ $# -gt 4 ];
if [ $# -lt 3 ] || [ $# -gt 5 ];
then
>&2 echo "USAGE: ./install_miner.sh MODE[production|local] SSH_DESTINATION HOTKEY_PATH|VALIDATOR_PUBLIC_KEY MINER_PORT:8000"
>&2 echo "USAGE: ./install_miner.sh MODE[production|local] SSH_DESTINATION HOTKEY_PATH|VALIDATOR_PUBLIC_KEY MINER_PORT:8000(optional) DEFAULT_EXECUTOR_CLASS(optional, local mode only)"
exit 1
fi

Expand Down Expand Up @@ -36,13 +36,16 @@ if [ "$MODE" == "production" ]; then
REMOTE_WALLET_NAME="$(basename "$(dirname "$REMOTE_HOTKEY_DIR")")"

VALIDATOR_PUBLIC_KEY=""
DEFAULT_EXECUTOR_CLASS=

elif [ "$MODE" == "local" ]; then
VALIDATOR_PUBLIC_KEY="$3"

REMOTE_HOTKEY_DIR=.bittensor/wallets/dummy/hotkeys
REMOTE_HOTKEY_NAME=dummy
REMOTE_WALLET_NAME=dummy

DEFAULT_EXECUTOR_CLASS="${5:-}"
else
>&2 echo "Invalid mode $MODE. Must be 'production' or 'local'"
exit 1
Expand All @@ -63,6 +66,7 @@ DEFAULT_ADMIN_PASSWORD="$DEFAULT_ADMIN_PASSWORD"
MIGRATING=$MIGRATING
MINER_PORT=$MINER_PORT
VALIDATOR_PUBLIC_KEY=$VALIDATOR_PUBLIC_KEY
DEFAULT_EXECUTOR_CLASS=$DEFAULT_EXECUTOR_CLASS
ENDCAT
ENDSSH

Expand Down Expand Up @@ -169,6 +173,8 @@ BITTENSOR_MINER_PORT=$(. ~/tmpvars && echo "$MINER_PORT")
BITTENSOR_MINER_ADDRESS=auto
COMPOSE_PROJECT_NAME=compute_horde_miner
DEFAULT_EXECUTOR_CLASS=$(. ~/tmpvars && echo "$DEFAULT_EXECUTOR_CLASS")
# make sure to unblock access to that port in your firewall
PORT_FOR_EXECUTORS=$(. ~/tmpvars && echo "$MINER_PORT")
Expand Down

0 comments on commit 656b2bf

Please sign in to comment.