diff --git a/compute/__init__.py b/compute/__init__.py index 7c03d15..55d2b65 100644 --- a/compute/__init__.py +++ b/compute/__init__.py @@ -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])) diff --git a/neurons/Miner/container.py b/neurons/Miner/container.py index 7812516..2995c24 100644 --- a/neurons/Miner/container.py +++ b/neurons/Miner/container.py @@ -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"] """ @@ -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: @@ -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 && \\