Last active
December 3, 2020 14:00
-
-
Save khursani8/95ed4930032e831ae720b7c50ef7678d to your computer and use it in GitHub Desktop.
cml colab
This file contains hidden or 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
| set -ex | |
| echo $(pwd) | |
| RUNNER_PATH=/home/runner | |
| RUNNER_ALLOW_RUNASROOT=1 | |
| mkdir ${RUNNER_PATH} | |
| cd ${RUNNER_PATH} | |
| echo $(pwd) | |
| echo $1 | |
| echo $2 | |
| # echo -e RUNNER_ALLOW_RUNASROOT=1\\nRUNNER_LABELS=cml,gpu\\nRUNNER_IDLE_TIMEOUT=72000\\nRUNNER_PATH\\nRUNNER_REPO=$1\\nrepo_token=$2\\n > /home/runner/.env | |
| export RUNNER_ALLOW_RUNASROOT=1 | |
| export RUNNER_LABELS=cml,gpu | |
| export RUNNER_IDLE_TIMEOUT=72000 | |
| export RUNNER_PATH=/home/runner | |
| export RUNNER_REPO=$1 | |
| export repo_token=$2 | |
| echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes | |
| apt-get update | |
| apt-get install --no-install-recommends --fix-missing build-essential apt-utils apt-transport-https ca-certificates software-properties-common pkg-config curl wget unzip gpg-agent sudo tzdata locales | |
| locale-gen en_US.UTF-8 && \ | |
| apt-get clean && rm -rf /var/lib/apt/lists/* | |
| add-apt-repository universe -y | |
| add-apt-repository ppa:git-core/ppa -y | |
| add-apt-repository ppa:longsleep/golang-backports -y | |
| curl -sL https://deb.nodesource.com/setup_12.x | bash | |
| apt-get update | |
| apt-get install -y git nodejs libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev libfontconfig-dev golang-go | |
| apt-get clean && rm -rf /var/lib/apt/lists/* | |
| npm config set user 0 | |
| npm install -g canvas vega vega-cli vega-lite | |
| mkdir /__t | |
| ln -s /__t /opt/hostedtoolcache | |
| wget -O /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64 && \ | |
| chmod +x /usr/local/bin/gitlab-runner && \ | |
| gitlab-runner install --user=root --working-directory=${RUNNER_PATH} && \ | |
| wget https://github.com/actions/runner/releases/download/v2.267.1/actions-runner-linux-x64-2.267.1.tar.gz && \ | |
| tar xzf actions-runner-linux-x64-2.267.1.tar.gz && \ | |
| ./bin/installdependencies.sh && \ | |
| apt-get clean && rm -rf /var/lib/apt/lists/* | |
| curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - && \ | |
| apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" && \ | |
| apt update && apt-get install -y terraform=0.13.2 && \ | |
| apt-get clean && rm -rf /var/lib/apt/lists/* | |
| npm config set user 0 && \ | |
| npm install -g @dvcorg/cml | |
| wget https://dvc.org/deb/dvc.list -O /etc/apt/sources.list.d/dvc.list && \ | |
| apt-get update && apt-get install -y dvc && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| cml-cloud-runner-entrypoint |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment