Title here
Summary here
Follow the steps below to easily set up a n1.16c virtual machine (VM) with the Ollama image using the exc
CLI.
Increase account quota?
Currently every new user is limited to just 4 CPU cores. To increase your quota email us at [email protected], we will try our best to increase it.
Log In to exc
exc
CLI. If you haven’t logged in yet, please refer to the Login and Registration Guide to complete the login process.Verify Login Status
exc compute list
401 Unauthorized
error, please log in again.SSH key
exc compute key list
Create a Security Group
exc securitygroup create --name ollama-security-group --description "Ollama ingress and egress"
Create Ingress Rules to Allow HTTP, SSH, Ollama Traffic
exc securitygroup rule ingress create --cidr 0.0.0.0/0 --protocol TCPv4 --port_range 80,22,11434 --security_group_id $(exc securitygroup list | awk '/ollama-security-group/{print $1}')
exc securitygroup rule ingress create --cidr ::/0 --protocol TCPv6 --port_range 80,22,11434 --security_group_id $(exc securitygroup list | awk '/ollama-security-group/{print $1}')
Create Egress Rules to Allow All Traffic
exc securitygroup rule egress create --cidr 0.0.0.0/0 --protocol IPv4 --port_range ANY --security_group_id $(exc securitygroup list | awk '/ollama-security-group/{print $1}')
exc securitygroup rule egress create --cidr ::/0 --protocol IPv6 --port_range ANY --security_group_id $(exc securitygroup list | awk '/ollama-security-group/{print $1}')
Use the following one-liner command to create a new n1.16c VM with the Ollama image. This command will automatically pass all the required parameters for a hassle-free experience.
exc compute create --allocate_public_ipv4 --name my-ollama-vm --image_id 5 --instance_type n1.16c --ssh_pubkey excloud --project_id 1 --security_group_id $(exc securitygroup list | awk '/ollama-security-group/{print $1}') --subnet_id $(exc compute subnet list | awk 'NR==2{print $1}')
awk
to extract the necessary IDs for subnet, SSH key, and security group.--allocate_public_ipv4
flag is used to allocate a public IP address to your VM.http://PUBLIC_IP:80