K0nkere / MLOps_Car-prices-project

Covers the most important stages of ML system / Auction car prices prediction model for MLOps-zoomcamp
0 stars 0 forks source link

Creation compute machine using Yandex Cloud #1

Open K0nkere opened 2 years ago

K0nkere commented 2 years ago

Compute cloud parameters

Name kkr-mlops-project
CPU 4
HDD 60Gb
RAM 16Gb
service account winx
public key

Connection

C:/Users/User_name/.ssh/config file

Host mlops-project
    HostName 51.250.18.218
    User winx
    IdentityFile c:/Users/Origin/.ssh/id_rsa
    StrictHostKeyChecking no

cmd >

ssh mlops-project

or

ssh -i ~/.ssh/id_rsa winx@<public_ip>

Environment preparation

sudo apt update

Installing Anaconda - Google > anaconda.com > Linux

wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh

Execute > read and yes

bash https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh

Test which python > it points to Anaconda /home/winx/anaconda3/bin/python


### Installing extentions for VSCode
python
remote - SSH
jupyter
K0nkere commented 1 year ago

Installing Docker

sudo apt install docker.io

Installing docker-compose Create soft folder Google docker-compose > github > releases > docker-compose-linux-x86_64

Go to soft and download via link and give it a name (-O) docker-compose

wget https://github.com/docker/compose/releases/download/v2.9.0/docker-compose-linux-x86_64 -O docker-compose

make it executable

chmod +x docker-compose

Its need to get access to soft folder from any location so Im add a variable to PATH home > nano .bashrc

add

export PATH="${HOME}/soft:${PATH}"

execute source .bashrc test which docker-compose > /home/winx/soft/docker-compose Test docker >

sudo docker run hello-world

I dont want to use sudo every time so its need to add our account to sudo group Google > docker without sudo > docs.docker >

sudo groupadd docker

already exists

  • Solution Change permissions to group docker for the current user with sudo rights
    sudo usermod -aG docker $USER 

    for another one user

    sudo usermod -aG docker <user_name>

    !!! Log out and log back > so it is possible test docker run hello-world

  • Solution 2 maybe it will require to set permissions
    sudo chmod 666 /var/run/docker.sock
  • Solutin 3 change the permissions of /var/run/docker.sock for the current user or desired user.
    sudo chown $USER /var/run/docker.sock

    Show info about groups and permission of a user

    
    id <user_name>