Last active
June 23, 2025 07:59
-
-
Save slickroot/13d1aa225c36c00d92557d72fcce9ba4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install git if not already installed | |
if ! command -v git &> /dev/null | |
then | |
echo "git could not be found, installing..." | |
apt-get update | |
apt-get install -y git | |
else | |
echo "git is already installed" | |
fi | |
# Install uv if not already installed | |
if ! command -v uv &> /dev/null | |
then | |
echo "uv could not be found, installing..." | |
apt-get update | |
apt-get install -y uv | |
else | |
echo "uv is already installed" | |
fi | |
BRANCH="${1:-${BRANCH:-slickroot/gpu-memory-aware-miner}}" | |
rm -rf IOTA | |
GIT_SSH_COMMAND='ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null' \ | |
git clone [email protected]:Datura-ai/iota.git IOTA | |
cd IOTA | |
git switch "$BRANCH" | |
# Install uv | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
# Source uv | |
source $HOME/.local/bin/env | |
# Make an env. | |
uv venv | |
# Source env | |
source .venv/bin/activate | |
# Install bittensor | |
uv pip install bittensor | |
# Install bittensor cli | |
uv pip install bittensor-cli | |
# Optional - update the bittensor-cli, if a new version is available | |
uv pip install --upgrade pip | |
# Install IOTA requirements. | |
uv sync | |
if [ ! -f .env ]; then | |
echo "Creating .env file with default configurations..." | |
cat <<EOL > .env | |
SIGNING_API_KEY=secret-bittensor | |
SIGNING_API_URL="http://3.144.48.81" | |
MINER_HOTKEY_SS58="${HOTKEY}" | |
netuid=9 | |
network="finney" | |
MOCK=False | |
BITTENSOR=True | |
HF_TOKEN="${HF}" | |
ORCHESTRATOR_HOST="iota.api.macrocosmos.ai" | |
ORCHESTRATOR_PORT=443 | |
ORCHESTRATOR_SCHEME=https | |
EOL | |
echo ".env file created." | |
else | |
echo ".env file already exists." | |
fi | |
source .env | |
# Launch miner | |
python launch_miner.py --env docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment