Skip to content

Update ollamainaction.yml #3

Update ollamainaction.yml

Update ollamainaction.yml #3

name: Setup Ubuntu VM with RDP, Bore, and Ollama
on: [push]
jobs:
setup:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install Bore
run: |
wget https://github.com/ekzhang/bore/releases/download/v0.5.1/bore-v0.5.1-x86_64-unknown-linux-musl.tar.gz
tar -xzf bore-v0.5.1-x86_64-unknown-linux-musl.tar.gz
chmod +x ./bore
- name: Install xrdp and xfce4
run: |
sudo apt-get update
sudo apt-get install -y xrdp xfce4 xfce4-goodies
echo "xfce4-session" > ~/.xsession
sudo systemctl enable xrdp
sudo systemctl start xrdp
- name: Create RDP User
run: |
sudo adduser --quiet --disabled-password --shell /bin/bash --home /home/rdpuser --gecos 'RDP User' rdpuser
echo "rdpuser:P@ssw0rd2024" | sudo chpasswd
sudo usermod -aG sudo rdpuser
- name: Open RDP Port in Firewall
run: |
sudo ufw allow 3389/tcp
sudo ufw reload
- name: Install Docker and Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker $USER
sudo systemctl enable docker
sudo systemctl start docker
sudo curl -L "https://github.com/docker/compose/releases/download/v2.14.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
- name: Install Ollama and Run Llama 3 Model
run: |
docker pull ollama/ollama
docker run -d --name ollama-server -p 3000:3000 ollama/ollama
- name: Start Bore for RDP and Ollama
run: |
./bore local 3389 --to bore.pub &
./bore local 3000 --to bore.pub &
wait