Skip to content

Commit

Permalink
Merge pull request #234 from neuralinternet/dev_pog
Browse files Browse the repository at this point in the history
Revert Update v1.7.0
  • Loading branch information
GenesisOpp authored Jan 6, 2025
2 parents 5460ae1 + 2484d9b commit 406fbeb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions compute/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
import string

# Define the version of the template module.
__version__ = "1.7.0"
__minimal_miner_version__ = "1.7.0"
__minimal_validator_version__ = "1.7.0"
__version__ = "1.7.1"
__minimal_miner_version__ = "1.6.0"
__minimal_validator_version__ = "1.6.1"

version_split = __version__.split(".")
__version_as_int__ = (100 * int(version_split[0])) + (10 * int(version_split[1])) + (1 * int(version_split[2]))
Expand Down
12 changes: 10 additions & 2 deletions neurons/Miner/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,15 @@ def run_container(cpu_usage, ram_usage, hard_disk_usage, gpu_usage, public_key,
# Setup SSH authorized keys
RUN mkdir -p /root/.ssh/ && echo '{docker_ssh_key}' > /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys

# Activate Conda environment on shell startup
# Activate Conda environment on shell startup (for interactive shells)
RUN echo "source /opt/conda/etc/profile.d/conda.sh && conda activate base" >> /root/.bashrc

# Ensure PATH includes Conda binaries
ENV PATH=/opt/conda/bin:$PATH

# Force "python3" to be the conda Python
RUN ln -sf /opt/conda/bin/python /usr/local/bin/python3

# Start SSHD
CMD ["/usr/sbin/sshd", "-D"]
"""
Expand All @@ -171,7 +174,6 @@ def run_container(cpu_usage, ram_usage, hard_disk_usage, gpu_usage, public_key,
# Determine container name based on ssh key
container_to_run = container_name if docker_ssh_key else container_name_test


# Step 2: Run the Docker container
device_requests = [DeviceRequest(count=-1, capabilities=[["gpu"]])]
# if gpu_usage["capacity"] == 0:
Expand Down Expand Up @@ -321,6 +323,12 @@ def build_sample_container():
sed -i 's/#ListenAddress 0.0.0.0/ListenAddress 0.0.0.0/' /etc/ssh/sshd_config
RUN mkdir -p /root/.ssh/ && echo '{""}' > /root/.ssh/authorized_keys && chmod 600 /root/.ssh/authorized_keys

# Ensure PATH includes Conda binaries
ENV PATH="/opt/conda/bin:$PATH"

# Force "python3" -> conda Python
RUN ln -sf /opt/conda/bin/python /usr/local/bin/python3

# Install numpy
RUN pip3 install --upgrade pip && \\
pip3 install numpy==1.24.3 && \\
Expand Down

0 comments on commit 406fbeb

Please sign in to comment.