diff --git a/.env-template b/.env-template index 11e910c..fdc2cde 100644 --- a/.env-template +++ b/.env-template @@ -5,6 +5,8 @@ WALLET_HOTKEY= CUDA_DEVICE= NETWORK= DEBUG= +NETUID=268 + # R2 Configuration R2_ACCOUNT_ID= diff --git a/docker/compose.yml b/docker/compose.yml index 5ced794..42b86b1 100644 --- a/docker/compose.yml +++ b/docker/compose.yml @@ -1,6 +1,6 @@ services: node: - image: ghcr.io/tplr-ai/templar:v0.0.4 + image: ghcr.io/tplr-ai/templar:v0.0.6 container_name: templar-${NODE_TYPE:-miner}-${WALLET_HOTKEY} restart: unless-stopped volumes: @@ -13,6 +13,7 @@ services: - CUDA_DEVICE=${CUDA_DEVICE:-cuda:0} - NETWORK=${NETWORK:-finney} - DEBUG=${DEBUG:-false} + - NETUID=${NETUID:-268} - WANDB_API_KEY=${WANDB_API_KEY} - HOST_CUDA_VERSION=12.6 - R2_ACCOUNT_ID=${R2_ACCOUNT_ID} diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh index f53f56f..6d10d67 100644 --- a/scripts/entrypoint.sh +++ b/scripts/entrypoint.sh @@ -2,7 +2,7 @@ set -e # Check required environment variables -for var in WALLET_NAME WALLET_HOTKEY NODE_TYPE WANDB_API_KEY; do +for var in WALLET_NAME WALLET_HOTKEY NODE_TYPE WANDB_API_KEY NETUID; do if [ -z "${!var}" ]; then echo "Error: $var environment variable is required" exit 1 @@ -42,6 +42,7 @@ if [ "$NODE_TYPE" = "miner" ]; then exec python3 neurons/miner.py \ --wallet.name ${WALLET_NAME} \ --wallet.hotkey ${WALLET_HOTKEY} \ + --netuid ${NETUID} \ --device ${CUDA_DEVICE} \ --subtensor.network ${NETWORK} \ --use_wandb \ @@ -51,6 +52,7 @@ elif [ "$NODE_TYPE" = "validator" ]; then exec python3 neurons/validator.py \ --wallet.name ${WALLET_NAME} \ --wallet.hotkey ${WALLET_HOTKEY} \ + --netuid ${NETUID} \ --device ${CUDA_DEVICE} \ --subtensor.network ${NETWORK} \ --use_wandb \ diff --git a/src/tplr/chain.py b/src/tplr/chain.py index 4677360..72fdce2 100644 --- a/src/tplr/chain.py +++ b/src/tplr/chain.py @@ -188,7 +188,7 @@ async def commit(self, wallet: "bt.wallet", bucket: Bucket) -> None: bucket (Bucket): Bucket configuration to commit """ if self.netuid: - raise ValueError("Subtensor and netuid must be set for chain operations") + raise ValueError("netuid must be set for chain operations") concatenated = ( bucket.account_id + bucket.access_key_id + bucket.secret_access_key