Skip to content

Commit

Permalink
give each machine its own separate build context
Browse files Browse the repository at this point in the history
  • Loading branch information
5u6r054 committed Jun 27, 2024
1 parent d524649 commit e1cb457
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
subtensor:
build:
context: ./docker/subtensor
dockerfile: docker/subtensor/Dockerfile
dockerfile: Dockerfile
container_name: subtensor_machine
ports:
- "9945:9945" # Expose port 9945
Expand All @@ -15,7 +15,7 @@ services:
subnet:
build:
context: ./docker/subnet
dockerfile: docker/subnet/Dockerfile
dockerfile: Dockerfile
container_name: subnet_machine
depends_on:
- subtensor
Expand All @@ -28,7 +28,7 @@ services:
miner:
build:
context: ./docker/miner
dockerfile: docker/miner/Dockerfile
dockerfile: Dockerfile
container_name: miner_machine
ports:
- "8093:8093"
Expand All @@ -43,7 +43,7 @@ services:
validator:
build:
context: ./docker/validator
dockerfile: docker/validator/Dockerfile
dockerfile: Dockerfile
container_name: validator_machine
ports:
- "8000:8000"
Expand Down
10 changes: 5 additions & 5 deletions docker/miner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ RUN python3 -m venv /opt/bittensor-venv && \
/opt/bittensor-venv/bin/pip install python-dotenv

# Copy the shared functions
COPY docker/functions.sh /app/functions.sh
COPY ../functions.sh /app/functions.sh

# Copy the entrypoint script
COPY docker/miner/entrypoint.sh /app/entrypoint.sh
COPY ./entrypoint.sh /app/entrypoint.sh

# Make the script executable
RUN chmod +x /app/entrypoint.sh

# Copy the neurons and masa directories
COPY neurons /app/neurons
COPY masa /app/masa
COPY requirements.txt /app/requirements.txt
COPY ../../neurons /app/neurons
COPY ../../masa /app/masa
COPY ../../requirements.txt /app/requirements.txt
RUN /opt/bittensor-venv/bin/pip install -r /app/requirements.txt

# Set the working directory
Expand Down
4 changes: 2 additions & 2 deletions docker/subnet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RUN python3 -m venv /opt/bittensor-venv && \
/opt/bittensor-venv/bin/pip install bittensor[torch]

# Copy the subnet creation script
COPY docker/functions.sh /app/functions.sh
COPY docker/subnet/entrypoint.sh /app/entrypoint.sh
COPY ../functions.sh /app/functions.sh
COPY ./entrypoint.sh /app/entrypoint.sh

# Make the script executable
RUN chmod +x /app/entrypoint.sh
Expand Down
4 changes: 2 additions & 2 deletions docker/subtensor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
RUN git clone https://github.com/opentensor/subtensor.git

# Copy the entyrpoint script into container
COPY docker/subtensor/entrypoint.sh /subtensor/entrypoint.sh
COPY ./entrypoint.sh /subtensor/entrypoint.sh

# Set the working directory
WORKDIR /subtensor
Expand Down Expand Up @@ -69,7 +69,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
RUN git clone https://github.com/opentensor/subtensor.git

# Copy the entrypoint script into container
COPY docker/subtensor/entrypoint.sh /subtensor/entrypoint.sh
COPY ./entrypoint.sh /subtensor/entrypoint.sh

# Set the working directory
WORKDIR /subtensor
Expand Down
10 changes: 5 additions & 5 deletions docker/validator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ RUN python3 -m venv /opt/bittensor-venv && \
/opt/bittensor-venv/bin/pip install python-dotenv

# Copy the validator creation script
COPY docker/functions.sh /app/functions.sh
COPY docker/validator/entrypoint.sh /app/entrypoint.sh
COPY ../functions.sh /app/functions.sh
COPY ./entrypoint.sh /app/entrypoint.sh

# Copy the neurons and masa directories
COPY neurons /app/neurons
COPY masa /app/masa
COPY requirements.txt /app/requirements.txt
COPY ../../neurons /app/neurons
COPY ../../masa /app/masa
COPY ../../requirements.txt /app/requirements.txt
RUN /opt/bittensor-venv/bin/pip install -r /app/requirements.txt

# Set the working directory
Expand Down

0 comments on commit e1cb457

Please sign in to comment.