Skip to content

Commit

Permalink
Update devcontainer configuration and scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
ulises-jeremias committed Feb 27, 2024
1 parent 8946557 commit 40d4b6f
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 6 deletions.
Empty file removed .dependencies_installed
Empty file.
3 changes: 3 additions & 0 deletions .devcontainer/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,7 @@ services:

# Overrides default command so things don't shut down after the process ends.
command: /bin/sh -c "while sleep 1000; do :; done"

environment:
- CARGO_HOME=/home/devcontainer/.cargo

4 changes: 4 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
// connected. This is typically a file mount in .devcontainer/compose.yml
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/rust:1": {
"installTools": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "latest"
Expand Down
3 changes: 0 additions & 3 deletions scripts/run_miner.sh

This file was deleted.

10 changes: 10 additions & 0 deletions scripts/run_openai_miner.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash

NETUID=${1:-1}
CHAIN_ENDPOINT=${2:-"ws://127.0.0.1:9946"}
WALLET_NAME=${3:-"openai_miner"}
WALLET_HOTKEY=${4:-"default"}

python -m pip install --upgrade --user -r ./neurons/miners/openai/requirements.txt

python ./neurons/miners/openai/miner.py --netuid $NETUID --subtensor.chain_endpoint $CHAIN_ENDPOINT --wallet.name $WALLET_NAME --wallet.hotkey $WALLET_HOTKEY --logging.debug
9 changes: 7 additions & 2 deletions scripts/run_validator.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#!/bin/bash
#!/bin/bash

python neurons/validators/validator.py --netuid 1 --subtensor.chain_endpoint ws://127.0.0.1:9946 --wallet.name validator --wallet.hotkey default --logging.debug
NETUID=${1:-1}
CHAIN_ENDPOINT=${2:-"ws://127.0.0.1:9946"}
WALLET_NAME=${3:-"validator"}
WALLET_HOTKEY=${4:-"default"}

python3 neurons/validators/validator.py --netuid $NETUID --subtensor.chain_endpoint $CHAIN_ENDPOINT --wallet.name $WALLET_NAME --wallet.hotkey $WALLET_HOTKEY --logging.debug
2 changes: 1 addition & 1 deletion scripts/setup_devcontainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Logic for setting up and running the environment
setup_environment() {
# Install the bittensor-prompting-example python package
python -m pip install -e .
python -m pip install --upgrade --user -e .

# Create and set up wallets
# This section can be skipped if wallets are already set up
Expand Down

0 comments on commit 40d4b6f

Please sign in to comment.