From 8f71cc027bc66d63ed5e5d3af8aee04776ffcaf7 Mon Sep 17 00:00:00 2001 From: distributedstatemachine! Date: Mon, 30 Dec 2024 11:59:15 +0000 Subject: [PATCH] ci --- docker-compose-test.yml | 72 ++++++++++++++++++++++++++++++++++ docker/Dockerfile | 3 -- docker/docker-compose-test.yml | 66 +++++++++++++++++-------------- 3 files changed, 108 insertions(+), 33 deletions(-) create mode 100644 docker-compose-test.yml diff --git a/docker-compose-test.yml b/docker-compose-test.yml new file mode 100644 index 0000000..88d15c6 --- /dev/null +++ b/docker-compose-test.yml @@ -0,0 +1,72 @@ +services: + miner1: + build: + context: . + dockerfile: docker/Dockerfile + container_name: templar-miner-M111 + volumes: + - ~/.bittensor/wallets:/root/.bittensor/wallets + - ./logs:/app/logs + environment: + NODE_TYPE: miner + WALLET_NAME: Bistro + WALLET_HOTKEY: M111 + CUDA_DEVICE: cuda:0 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ['0', '1', '2'] + capabilities: [gpu] + + miner2: + build: + context: . + dockerfile: docker/Dockerfile + container_name: templar-miner-M222 + volumes: + - ~/.bittensor/wallets:/root/.bittensor/wallets + - ./logs:/app/logs + environment: + NODE_TYPE: miner + WALLET_NAME: Bistro + WALLET_HOTKEY: M222 + CUDA_DEVICE: cuda:1 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ['0', '1', '2'] + capabilities: [gpu] + + validator: + build: + context: . + dockerfile: docker/Dockerfile + container_name: templar-validator-V11 + volumes: + - ~/.bittensor/wallets:/root/.bittensor/wallets + - ./logs:/app/logs + environment: + NODE_TYPE: validator + WALLET_NAME: Bistro + WALLET_HOTKEY: V11 + CUDA_DEVICE: cuda:2 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} + deploy: + resources: + reservations: + devices: + - driver: nvidia + device_ids: ['0', '1', '2'] + capabilities: [gpu] \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 1dcaccf..8cbbae0 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -17,9 +17,6 @@ RUN apt-get update && apt-get install -y \ # Install uv RUN pip install uv -# Install Rust and Cargo -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y - ENV PATH="/root/.cargo/bin:${PATH}" # Copy project files diff --git a/docker/docker-compose-test.yml b/docker/docker-compose-test.yml index 2509ccf..16295c1 100644 --- a/docker/docker-compose-test.yml +++ b/docker/docker-compose-test.yml @@ -1,66 +1,72 @@ services: miner1: - build: . + build: + context: . + dockerfile: Dockerfile container_name: templar-miner-M111 volumes: - ~/.bittensor/wallets:/root/.bittensor/wallets - ./logs:/app/logs environment: - - NODE_TYPE=miner - - WALLET_NAME=Bistro - - WALLET_HOTKEY=M111 - - CUDA_DEVICE=cuda:0 - - NETWORK=test - - DEBUG=true - - WANDB_API_KEY=${WANDB_API_KEY} + NODE_TYPE: miner + WALLET_NAME: Bistro + WALLET_HOTKEY: M111 + CUDA_DEVICE: cuda:0 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} deploy: resources: reservations: devices: - driver: nvidia - device_ids: [ '0', '1', '2' ] - capabilities: [ gpu ] + device_ids: ['0', '1', '2'] + capabilities: [gpu] miner2: - build: . + build: + context: . + dockerfile: Dockerfile container_name: templar-miner-M222 volumes: - ~/.bittensor/wallets:/root/.bittensor/wallets - ./logs:/app/logs environment: - - NODE_TYPE=miner - - WALLET_NAME=Bistro - - WALLET_HOTKEY=M222 - - CUDA_DEVICE=cuda:1 - - NETWORK=test - - DEBUG=true - - WANDB_API_KEY=${WANDB_API_KEY} + NODE_TYPE: miner + WALLET_NAME: Bistro + WALLET_HOTKEY: M222 + CUDA_DEVICE: cuda:1 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} deploy: resources: reservations: devices: - driver: nvidia - device_ids: [ '0', '1', '2' ] - capabilities: [ gpu ] + device_ids: ['0', '1', '2'] + capabilities: [gpu] validator: - build: . + build: + context: . + dockerfile: Dockerfile container_name: templar-validator-V11 volumes: - ~/.bittensor/wallets:/root/.bittensor/wallets - ./logs:/app/logs environment: - - NODE_TYPE=validator - - WALLET_NAME=Bistro - - WALLET_HOTKEY=V11 - - CUDA_DEVICE=cuda:2 - - NETWORK=test - - DEBUG=true - - WANDB_API_KEY=${WANDB_API_KEY} + NODE_TYPE: validator + WALLET_NAME: Bistro + WALLET_HOTKEY: V11 + CUDA_DEVICE: cuda:2 + NETWORK: test + DEBUG: 'true' + WANDB_API_KEY: ${WANDB_API_KEY} deploy: resources: reservations: devices: - driver: nvidia - device_ids: [ '0', '1', '2' ] - capabilities: [ gpu ] + device_ids: ['0', '1', '2'] + capabilities: [gpu] \ No newline at end of file