Code Monkey home page Code Monkey logo

io-net-setup-mac's Introduction

Enligsh/中文

io-net-setup-mac

This document describes how to setup IO net node on a mac host(with m1 or m2 cpu), in a much simpler way, withou needing to install docker desktop(huge and laggy on mac). We can complete all the steps in our terminal. In this doc, we use colima, an alternative linux vm engine on mac os, to provide the linux runtime for docker.

Prerequisites

  • Have a Mac machine(with m1 or m2 cpu).
  • Have an io.net account and walk throught the worker setup flow on io.net. Steps:
    1. Go to io.net and Sign up(top right corner).
    2. Go to https://cloud.io.net/worker/devices and click Connect New Worker(top right corner).
    3. Fill up the form until the step "Download and launch binary" shows up.

Steps

This guide doesn't use docker-desktop, which is recommended by the offical steps, but uses a light-weight Linux runtime provider, called https://github.com/abiosoft/colima.

Open Terminal on Mac

Search for "terminal" app and open it. all the following setps will be perfomed in the terminal.

Installing Dependencies

brew install colima
brew install docker # this is not docker desktop. It's only the docker command line tool.

Start the Linux Runtime

# we allocate this much resource because we might get some jobs from io.net, and the image itself is already very big
colima start --cpu 8 --memory 16 --disk 50

Download the io.net Binary

curl -L https://github.com/ionet-official/io_launch_binaries/raw/main/launch_binary_mac -o launch_binary_mac
chmod +x launch_binary_mac

Run the Container to Setup the Worker

Copy the command in the step "3. Run the command to connect device", from the "Add New Devices" form in your broswer(the one we followed in the prerequisites section). It will be in the following format: ./launch_binary_mac --device_id=xxxxxx --user_id=xxxxx --operating_system="macOS" --usegpus=false --device_name=xxxxx Every time you setup a new decive, the command will be different.

Paste the copied command to your terminal and hit enter. Wait for the command to return.

Verify Your Containers are Up

After 5-10 minutes, use the following command to check your container status:

docker ps

You should see 2 containers running, like this(the CONTAINER ID and NAMES columns will be different):

CONTAINER ID   IMAGE                               COMMAND                  CREATED             STATUS             PORTS     NAMES
d4b2059f4060   ionetcontainers/io-worker-monitor   "tail -f /dev/null"      About an hour ago   Up About an hour             goofy_vaughan
a81cc2d5f904   ionetcontainers/io-worker-vc        "sudo -E /srp/invoke…"   About an hour ago   Up About an hour             friendly_meninsky

io-net-setup-mac's People

Contributors

cadenguo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.