This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
set -eu | |
# find path to liblzma used by sshd | |
path="$(ldd $(which sshd) | grep liblzma | grep -o '/[^ ]*')" | |
# does it even exist? | |
if [ "$path" == "" ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stages: | |
train: | |
cmd: python train.py | |
params: | |
- params.yaml: | |
metrics: | |
- dvclive/metrics.json: | |
cache: false | |
plots: | |
- dvclive/plots: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GITLAB_API_TOKEN={token} # where {token} is an API token in the form /glpat-.*/ | |
GITLAB_PROJECT_SLUG={user}%2F{project} # where {user} and {project} are placeholders | |
GITLAB_RUNNERS_TOKEN=$(curl --header "Authorization: Bearer $GITLAB_API_TOKEN" "https://gitlab.com/api/v4/projects/$GITLAB_PROJECT_SLUG" | jq --raw-output .runners_token) | |
GITLAB_RUNNER_REGISTRATION_TOKEN=$(curl --form token="$GITLAB_RUNNERS_TOKEN" https://gitlab.com/api/v4/runners | jq --raw-output .token) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy | |
on: | |
workflow_call: | |
inputs: | |
deploy_ref: | |
required: true | |
type: string | |
environment: | |
required: true | |
type: string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipelines: | |
default: | |
- step: | |
name: deploy-runner | |
image: iterativeai/cml:0-dvc2-base1 | |
script: | |
- | | |
leo_id=$(leo create \ | |
--cloud="aws" \ | |
--region="us-east-1" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Buffer } = require('buffer'); | |
const apply = async (opts = {}) => { | |
const { dir = './', json = false } = opts; | |
return new Promise( (resolve, reject) => { | |
const stderrCollection = []; | |
//const tf_proc = require('child_process').spawn('terraform',['apply', '-auto-approve', '-json'], { | |
//const tf_proc = require('child_process').spawn('terraform',['refresh', '-json'], { | |
const tf_proc = require('child_process').spawn('terraform',['destroy', '-auto-approve', '-json'], { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
driver_version="515.48.07" | |
nvidia_dl_path="https://us.download.nvidia.com/XFree86/Linux-x86_64/" | |
__temp=$(mktemp -d) | |
pushd "$__temp" || exit | |
apt-get update -y | |
apt-get install -y git build-essential | |
wget "$nvidia_dl_path$driver_version/NVIDIA-Linux-x86_64-$driver_version.run" -O web-installer | |
git clone --depth 1 --branch "$driver_version" https://github.com/NVIDIA/open-gpu-kernel-modules.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo 'echo "$(curl https://github.com/'"$GITHUB_ACTOR"'.keys)" >> /home/ubuntu/.ssh/authorized_keys' | base64 -w 0 | |
# or | |
--cloud-startup-script=$(echo 'echo "$(curl https://github.com/'"$GITHUB_ACTOR"'.keys)" >> /home/ubuntu/.ssh/authorized_keys' | base64 -w 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os.WriteFile("/tmp/log.txt", []byte(fmt.Sprintf("%s \n %v \n %w", project, res, err)), os.ModeAppend) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: install terraform | |
hosts: all | |
become: true | |
tasks: | |
- name: Terraform deps | |
apt: | |
update_cache: true | |
state: present | |
pkg: |
NewerOlder