examples/Natural-Language-Processing/1. Install/Install.md

5.3 KiB
Raw Blame History

Clean Kubeflow v1.2 (Minikube)

kubeflow v1.2 cannot be directly upgraded to kubeflow v1.3, you need to delete kubeflow v1.2 and install kubeflow v1.3.
Don't forget to back up your files.

Step 1Delete minikube environment

minikube stop
minikube delete --purge

Step 2Delete docker image

docker system prune -a

Step 3Delete instruction packet

cd /usr/local/bin/
sudo rm -rf *

Step 4Enable boot cleanup

cd /usr/lib/tmpfiles.d
sudo gedit tmp.conf

In line 11, uncommented indicates that startup cleanup is enabled, and comment indicates that startup cleanup is not enabled.
ls -l no
Ctrl + s Save after modification.

Install Kubeflow v1.3 (First minikube start)

Step 1Open the terminal

You must make sure you can find the following files when typing ls -l on the terminal.

ls -l

ls -l no
Then you can proceed to the next step.

Step 2Give execution permission

sudo chmod +x docker.sh
sudo chmod +x minikube.sh
sudo chmod +x kubeflow.sh

or

sudo chmod +x *.sh

If successful, the file name will turn green.
ls -l yes
Then you can proceed to the next step.

Step 3sudo ./docker.sh

sudo ./docker.sh

reboot VM or computer.
Then confirm the docker version.
docker version
If you can see Clinet and Server versions, it means success.

Step 4sudo ./minikube.sh

sudo ./minikube.sh

After success, you will see the following screen. (first time)
first minikube
Next, you can change the owner of the .kube and .minikube folders.
In this way, subsequent commands related to kubectl and minikube do not need to add sudo.
The line with the second red exclamation mark indicates the storage location of .kube and .minikube.

sudo chown -R <user_name> .kube .minikube

You can enter ls -l -a to confirm, the first name is the owner and the second name is the group.

ls -l -a

chown
Its okay if you dont do this step to change the owner, you can skip it directly.

Step 5sudo ./kubeflow.v13.sh

sudo ./kubeflow.v13.sh

After execution, enter the following command to observe the pods status:

kubectl get pods -n kubeflow

get pods
It takes about 30 minutes to wait for 16G RAM.
After seeing the same situation as on the screen, you can proceed to the next step.

Step 6Port-forward

After all the pods are running

kubectl port-forward -n istio-system svc/istio-ingressgateway 8080:80

Input in the browser

http://localhost:8080/

or

127.0.0.1:8080

login

  • Email Addressuser@example.com
  • Password12341234

kubeflow home

Step 7Disable boot cleanup

cd /usr/lib/tmpfiles.d
sudo gedit tmp.conf

In line 11, uncommented indicates that startup cleanup is enabled, and comment indicates that startup cleanup is not enabled.
ls -l no
Ctrl + s Save after modification.

Kubeflow installed on Minikube will store data in /tmp/hostpath-provisioner.
The data in /tmp will be deleted after shutdown.
To ensure that the data is not deleted, this function needs to be disabled.

Second minikube start

After the installation is complete and startup cleanup is disabled, you can shut down your computer without worrying about data loss. After restarting the computer or virtual machine, enter:

minikube stop

Close Minikube completely, and enter:

minikube start

Wait for Minikube to start.
second minikube
After starting, confirm whether the Pod is running. After running, you can execute port-forward.

Relevant part