Name: mlops-demo
Configuration:
Name: mlops-zoomcamp
Region: asia-northeast3 (Seoul)
Zone: asia-northeast3-a
Series: N2
Machine Type: n2-standard-4
Boot disk:
Image: Ubuntu 22.04 LTS (30 GB)
Firewall: Check both
Allow HTTP traffic
Allow HTTPS traffic
View Network details > IP addresses > Reserve external static IP address
Generate and copy key
ssh-keygen -t rsa -f ~/.ssh/mlops-zoomcamp -C pytholic
cat ~/.ssh/mlops-zoomcamp.pub
On GCP console, enter the copied public key
Compute Engine*> Metadata > SSH Key*
ssh -i ~/.ssh/mlops-zoomcamp pytholic@<External VM IP>
Optional, Add host to hostname file for easy login
Enter the following into ~/.ssh/config
vim ~/.ssh/config
Host gcp-mlops-zoomcamp
HostName 34.64.207.252 # VM Public IP
User pytholic # VM user
IdentityFile ~/.ssh/mlops-zoomcamp # Private SSH key file
StrictHostKeyChecking no
ssh gcp-mlops-zoomcamp
- Anaconda
cd ~
wget https://repo.anaconda.com/archive/Anaconda3-2022.05-Linux-x86_64.sh
bash Anaconda3-2022.05-Linux-x86_64.sh
- Docker
sudo apt update
sudo apt install docker.io
- Docker-Compose
sudo apt install docker-compose
Add current user to docker group
sudo usermod -aG docker $USER
Log out and log in again.
- Verify installations
which python
# /home/pytholic/anaconda3/bin/python
which docker
# /usr/bin/docker
which docker-compose
# /usr/bin/docker-compose
docker run hello-world
- Install
Remote SSH
extension - Connect to host
- Select
gcp-mlops-zoomcamp
- Run notebook in remote terminal jupyter notebook
- Use port forwarding
- In VS Code
- Go to
ports
tab and forward8888
- Go to
- Go to
localhost:8888
- Copy
token
from terminal and set a new password