Skip to content

Commit

Permalink
update paths
Browse files Browse the repository at this point in the history
  • Loading branch information
5u6r054 committed Jun 26, 2024
1 parent ade3ef9 commit 5196f3f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
12 changes: 10 additions & 2 deletions docker/subnet/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# Import shared functions
source functions.sh
source /app/functions.sh

# Create and fund owner wallets
#
Expand All @@ -11,11 +11,19 @@ echo -e "$COLDKEY_PASSWORD\n$COLDKEY_PASSWORD" | btcli wallet new_coldkey --wall
# Create a new hotkey with the specified password
echo -e "$HOTKEY_PASSWORD\n$HOTKEY_PASSWORD" | btcli wallet new_hotkey --wallet.name owner --wallet.hotkey miner_hotkey --wallet.password

# Use the faucet for the owner wallet multiple times to get enough tTAO to register a subnet
# Spawn 4 faucet operations
for i in {1..4}; do
run_faucet owner || { echo "Faucet $i failed for owner wallet"; exit 1; }
done

# Wait for all background processes to finish
wait

# Check if any of the faucet operations failed
for job in $(jobs -p); do
wait $job || { echo "A faucet operation failed"; exit 1; }
done

echo -e "Owner faucet has run 4 times, now has 1200 τTAO"

# Register / Create a Subnet using expect to handle the interactive prompt and password
Expand Down
7 changes: 0 additions & 7 deletions docker/subtensor/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

: "${CHAIN:=local}"
: "${BUILD_BINARY:=1}"
: "${SPEC_PATH:=specs/}"
: "${FEATURES:=pow-faucet}"

Expand All @@ -12,12 +11,6 @@ if [ ! -d "$SPEC_PATH" ]; then
mkdir $SPEC_PATH
fi

if [[ $BUILD_BINARY == "1" ]]; then
echo "*** Building substrate binary..."
cargo build --release --features "$FEATURES"
echo "*** Binary compiled"
fi

echo "*** Building chainspec..."
./target/release/node-subtensor build-spec --disable-default-bootnode --raw --chain $CHAIN > $FULL_PATH
echo "*** Chainspec built and output to file"
Expand Down
8 changes: 4 additions & 4 deletions docker/validator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ ENV PATH="/opt/bittensor-venv/bin:$PATH"
# Make the entrypoint script executable
RUN chmod +x /app/entrypoint.sh

# Check and consider healthy when serving on port 8000
HEALTHCHECK --interval=5s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000 || exit 1

# Set the entry point to run the script
ENTRYPOINT ["/app/entrypoint.sh"]

# Add a command to keep the container running
CMD ["tail", "-f", "/dev/null"]

# Check and consider healthy when serving on port 8000
HEALTHCHECK --interval=5s --timeout=5s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000 || exit 1

0 comments on commit 5196f3f

Please sign in to comment.