Code Monkey home page Code Monkey logo

k3ai-docs's Introduction

K3ai (keɪ3ai)

K3ai is a lightweight infrastructure-in-a-box specifically built to install and configure AI tools and platforms to quickly experiment and/or run in production over edge devices.

Ready to experiment?

All you have to do is, download the binary for your Operating System, move it to your path (if you like easy things), and use it.

Linux (including Microsoft WSL)

curl -sfL "https://get.k3ai.in" -o k3ai.tar.gz

once downloaded untar the file and move it to your path

tar -xvzf k3ai.tar.gz \
&& chmod +x ./k3ai \
&& sudo mv ./k3ai /usr/local/bin

Windows

Invoke-WebRequest -Uri "https://get-win.k3ai.in" -OutFile k3ai.zip

once downloaded unzip the file and move it to your path or execute it from a folder of your choice (i.e.: k3ai.exe -h)

 Expand-Archive -Path .\k3ai.zip

Mac

curl -sfL "https://get-mac.k3ai.in" -o k3ai.tar.gz

once downloaded untar the file and move it to your path

tar -xvzf k3ai.tar.gz \
&& chmod +x ./k3ai \
&& sudo mv ./k3ai /usr/local/bin

Arm64

curl -sfL "https://get-arm.k3ai.in" -o k3ai.tar.gz

once downloaded untar the file and move it to your path

tar -xvzf k3ai.tar.gz \
&& chmod +x ./k3ai \
&& sudo mv ./k3ai /usr/local/bin

Alternative method for Linux

If for any reason it fails just go straight away to https://github.com/kf5i/k3ai-core/releases and download the binary. Place it in your path and that's it.

or use the following

#Set a variable to grab latest version
Version=$(curl -s "https://api.github.com/repos/kf5i/k3ai-core/releases/latest" | awk -F '"' '/tag_name/{print $4}' | cut -c 2-6) 
# get the binaries
wget https://github.com/kf5i/k3ai-core/releases/download/v$Version/k3ai-core_${Version}_linux_amd64.tar.gz

Looking for more interaction? join our Slack channel here****

What we do support:

  • Windows
  • Linux
  • Mac
  • ARM

NOTE: Unfortunately not all plugins work with ARM. We will take care of this and make a way to let you know before installing them

Components of K3ai

Currently, we install the following components (the list is changing and growing):

k3ai-docs's People

Contributors

alefesta avatar alfsuse avatar k3aibot avatar kwwii avatar saiyam1814 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

k3ai-docs's Issues

Improved logic of k3ai init

I'm still starting out with K3AI but I think the logic of the init subcommand could use some improvement.

It seems like if you run k3ai init when there is no config.yaml file, it creates the file and nothing else.

If you run the command after there is a config.yaml file, it applies the configuration described in the file.

If that's correct, it seems a little unusual to me. Have you thought of maybe rolling the cluster creation into the apply subcommand?

Perhaps in that way you could use the invocation of init to create the file if it doesn't exist, plus it could summarize what the resulting cluster config would be in all cases. That would lend itself to more consistent behaviour of init.

Typo in Hello-Universe

k3ai apply -f kubeflow-pipelines-traefik
should be
k3ai apply -g kubeflow-pipelines-traefik

Stuck getting up and running

I was under the impression most things would take 3 lines or less, but so far this is what I've tried without success. Please help! :-) I love what you've done so far and if I can POC it would like to see how I can leverage it for making the ops easier for data scientists.

#!/bin/bash
# k3ai installer

echo "Installing kubectl, k9s, docker, k3s, and k3ai."

# install docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker $USER
exec $SHELL

sudo mkdir -p /etc/systemd/system/docker.service.d/
cat << EOF | sudo tee /etc/systemd/system/docker.service.d/proxy.conf
[Service]
Environment="HTTP_PROXY=${HTTPS_PROXY}"
Environment="HTTPS_PROXY=${https_proxy}"
Environment="NO_PROXY=localhost,127.0.0.1,::1,.internal.domain.com"
EOF

# install kubectl
cd /tmp
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

# install k9s
curl -LO "https://github.com/derailed/k9s/releases/download/v0.24.9/k9s_Linux_x86_64.tar.gz"
tar -xvf k9s*.tar.gz
sudo install -o root -g root -m 0755 k9s /usr/local/bin/k9s

# install k3s
#curl -sfL https://get.k3s.io | sh -
#k3s kubectl get node

# install k3ai
curl -fL "https://get.k3ai.in" -o k3ai.tar.gz
tar -xvzf k3ai.tar.gz
sudo install -o root -g root -m 0755 k3ai /usr/local/bin/k3ai

echo "DONE. You can now proceed with the init steps here:"
echo "  https://docs.k3ai.in/examples/hello-home"
echo "If the above installation or next init steps fail, ensure you have set both"
echo "  http_proxy and https_proxy variables, then rerun this script and"
echo "  they will be configured for docker."
echo "Also make sure you have performed `docker login` for dockerhub."

Then

k3ai init --local k3s
or
k3ai init --confing ~/.k3ai/config.yaml

with all the other parts except k3s commented out.

I also tried installing k3s as noted above (commented out).

I'm still getting the follow errors in output:

me@k3ai:~$ k3ai init --config .k3ai/config.yaml 
☑️       Checking requirements for local deployment...
☑️       Installing infrastructure for local deployment...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file /home/nick_reith/k3s: Is a directory
  3 24986    3   791    0     0   1557      0  0:00:16 --:--:--  0:00:16  1557
curl: (23) Failed writing body (0 != 791)
chmod: cannot access './home/me/k3s': No such file or directory
mv: cannot stat './home/me/k3s': No such file or directory
[1] 17364
☑️       Infrastructure ready, proceeding to plugins installation (if any)...
☑️       Add Plugins to local deployment...
fork/exec bin/sh: no such file or directory
fork/exec bin/sh: no such file or directory
☑️       Plugins added to local deployment...
🎉      Local deployment completed, have fun with k3ai!

To use K3ai copy the following line: 🦾
➡️  export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
Thank you again for using K3ai, don't forget to check our docs at 🗺️ https://docs.k3ai.in
nick_reith@k3ai:~$ k3ai apply jupyter-minimal
Plugin YAML content: [{https://raw.githubusercontent.com/kf5i/k3ai-plugins/main/common/jupyter/base/deployment.yaml file}], name: jupyter-minimal 
Unable to connect to the server: Service Unavailable
Unable to connect to the server: Service Unavailable
Unable to connect to the server: Service Unavailable
2021/05/12 02:33:13 Error during create: exit status 1

Possible typo in Hello-Universe

I'm pretty sure that:

In another tab of your browser open the Kubeflow UI (http://:8888
should be
In another tab of your browser open the Kubeflow UI (http://:8080)

Roadmap Documentation

A roadmap section that links to a Github project where contributors may insert their own ideas and features request.

Add Contributing file to k3ai repos

We need to add Contributing guidelines to the K3ai repos:

  • K3ai-core
  • K3ai
  • K3ai-plugins
  • K3ai-site
    While most of the contributing guidelines will be the same we probably should need an OWNERS/REVIEWERS file in each repo so to better manage the approval processes

Cluster initialization and/or importation

Again, I'm still in the beginning stages of working with K3AI so some of this might only be valuable as a view into one person's rookie-mistakes.

It seems like there are four different paths a user could take when it comes to the underlying K8s cluster:

  • A cluster that needs to be installed on the same (aka local) system as the K3AI tool is installed.
  • A cluster that needs to be installed on one or more hosts (aka remote) that are different from the one where the K3AI tool is installed.
    • This could also encapsulate a cluster where K3AI is installed on one of the cluster nodes.
  • An existing cluster that just needs to be referenced via its KUBECONFIG file.
  • A cluster that will be deployed via a cloud provider API.

It seems that this could be described with the k3ai init options of:

  • --local (no passwordless SSH and/or sudo required)
  • --remote (requires passwordless SSH and/or sudo)
    • The config file would require things like node IP's, LB IP, SSH key location and/or contents, etc.
  • --import (very minimal config file to contain the KUBECONFIG file location and/or contents)
  • --cloud (I haven't touched this yet)

Goals Documentation

A page on why we developed k3ai and what problem we try to solve so folks from the AI community may decide to contribute to the project

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.