OSS-MLOPS-PLATFORM / oss-mlops-platform

OSS MLOps Platform
MIT License
20 stars 7 forks source link

Kubectl installation PATH configuration in a Ubuntu 22.04 VM requires reboot #40

Open K123AsJ0k1 opened 3 weeks ago

K123AsJ0k1 commented 3 weeks ago

The kubectl installation and configuration in the current setup.sh might require reboot in some operating systems for the PATH configuration. For example, when I tried to setup the OSS platform in a GPU CPouta VM flavor using ubuntu 22.04, but it gave the following error during kind cluster creation:

Adding ~/.local/bin to $PATH in ~/.profile)
Client Version: v1.28.2
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Done!
./setup.sh: line 160: kind: command not found
Creating kind cluster...
/home/ubuntu/cloud-hpc-oss-mlops-platform/scripts/create_cluster.sh: line 14: kind: command not found

This problem vanished, when I rebooted the VM, which enabled the setup.sh to install the OSS platform normally. A temporary fix for this is to mention this problem and the solution in the setup.md troubleshoot.

dmuiruri commented 3 weeks ago

When I last tested OSS installation in CPouta VMs, I also used Ubuntu 22.04 images and did not encounter such behaviour, but it is still possible if there have been updates on OSS since I tested it.

JoaquinRives commented 2 weeks ago

Sounds like the add_local_bin_to_path (or source ~/.profile) not working properly on CPouta VMs. No idea how CPouta VMs OS works, but it might be possible to update the add_local_bin_to_path function so that it is not necessary to reboot.


  # make sure ~/.local/bin is in $PATH
  BASE=~
  if [[ ":$PATH:" != *${BASE}/.local/bin* ]]; then
    echo 'Adding ~/.local/bin to $PATH in ~/.profile)'
    echo "" >> ~/.profile
    echo 'PATH="$HOME/.local/bin:$PATH"' >> ~/.profile
    source ~/.profile
  fi
}