forked from Orpheus-AI/Zeus
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·75 lines (63 loc) · 2.22 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·75 lines (63 loc) · 2.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# check if sudo exists as it doesn't on RunPod
if command -v sudo 2>&1 >/dev/null
then
PREFIX="sudo"
else
PREFIX=""
fi
$PREFIX apt update -y
$PREFIX apt install -y \
python3-pip \
nano \
libgl1 \
npm
$PREFIX npm install -g pm2@latest
# install repository itself
pip install -e . --use-pep517
# Create miner.env if it doesn't exist
if [ -f "miner.env" ]; then
echo "File 'miner.env' already exists. Skipping creation."
else
cat > miner.env << 'EOL'
# Subtensor Network Configuration:
NETUID= # Network UID options: 18, 301
SUBTENSOR_NETWORK= # Networks: finney, test, local
SUBTENSOR_CHAIN_ENDPOINT=
# Endpoints:
# - wss://entrypoint-finney.opentensor.ai:443
# - wss://test.finney.opentensor.ai:443/
# Wallet Configuration:
WALLET_NAME=default
WALLET_HOTKEY=default
# Miner Settings:
AXON_PORT=
BLACKLIST_FORCE_VALIDATOR_PERMIT=True # Default setting to force validator permit for blacklisting
EOL
echo "File 'miner.env' created."
fi
# Create validator.env if it doesn't exist
if [ -f "validator.env" ]; then
echo "File 'validator.env' already exists. Skipping creation."
else
cat > validator.env << 'EOL'
NETUID= # Netuids: 18 (for finney), 301 (for testnet)
SUBTENSOR_NETWORK= # Networks: finney, test, local
SUBTENSOR_CHAIN_ENDPOINT=
# Endpoints:
# - wss://entrypoint-finney.opentensor.ai:443
# - wss://test.finney.opentensor.ai:443/
# Wallet Configuration:
WALLET_NAME=default
WALLET_HOTKEY=default
# Validator Port Setting:
AXON_PORT=
PROXY_PORT=
# API Keys:
WANDB_API_KEY= # https://wandb.ai/authorize
CDS_API_KEY = # https://github.com/Orpheus-AI/Zeus/blob/main/docs/Validating.md#ecmwf
PROXY_API_KEY= # Your Proxy API Key, you can generate it yourself
EOL
echo "File 'validator.env' created."
fi
echo "Environment setup completed successfully."