Skip to content

Instantly share code, notes, and snippets.

@achimnol
Last active February 4, 2024 15:15
Show Gist options
  • Save achimnol/579a3416832bee9ddda228092f8df7f6 to your computer and use it in GitHub Desktop.
Save achimnol/579a3416832bee9ddda228092f8df7f6 to your computer and use it in GitHub Desktop.
fresh-vm-for-backendai-dev
#cloud-config
package_update: true
package_upgrade: true
groups:
- docker
system_info:
default_user:
groups: [ docker ]
packages:
# docker dependencies
- ca-certificates
- curl
# pyenv dependencies
- git-core
- build-essential
- libssl-dev
- zlib1g-dev
- libbz2-dev
- libreadline-dev
- libsqlite3-dev
- libncursesw5-dev
- xz-utils
- tk-dev
- libxml2-dev
- libxmlsec1-dev
- libffi-dev
- liblzma-dev
write_files:
- path: /usr/local/bin/init-pyenv.sh
permissions: '0755'
content: |
curl https://pyenv.run | bash
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
- path: /usr/local/bin/clone-src.sh
permissions: '0755'
content: |
pyenv install 3.11.6
git clone https://github.com/lablup/backend.ai bai-edge
- path: /usr/local/bin/install-docker.sh
permissions: '0755'
content: |
# Add Docker's official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment