Access to a container in local from host (Don’t confuse with localhost(Ubuntu). host is my mac. local or localhost is Ubuntu)

Run from iterm (mac)

ssh -L 9090:localhost:8000 jun@hotcake

=> mac’s 9090 port is tunneled to localhost (hotcake) 8000 port

Run from hotcake
docker run -d --name api-server -p 8000:8000 part5-api-server

=> localhost (hotcake) port 8000 is connected to container’s 8000 port.

Access to

link

from mac.

Use this for 1) MLflow Setup ML Engineer를 위한 MLOps

ssh -L 9091:localhost:5001 jun@hotcake


How to find which PID is using which port?

lsof -i:<port>
ex) lsof -i :8000


History command

Use history to see previous commands I used in a terminal


cat /proc/driver/nvidia/version

Show current driver version (NVRM) nvidia-smi shows NVML library version


sudo apt purge –autoremove ‘nvidia’ ‘nvidia:i386’

Remove nvidia packages


Installing nvidia driver (the one you see when nvidia-smi)

install the specific driver you want
sudo apt install nvidia-driver-510

To check which is the recommended driver for your Nvidia card run:
ubuntu-drivers devices

If you want to install the driver automatically, run :
sudo ubuntu-drivers autoinstall

If you want to install a specific driver version #(410, 440…), run:
sudo apt install nvidia-<driver number>


Show current version

cat /proc/driver/nvidia/version