Spaces:
Runtime error
Runtime error
File size: 1,737 Bytes
8018595 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
#!/usr/bin/env bash
set -ex
# Update package lists
apt-get update
# ----- Linux Packages ----- #
apt-get install -y curl wget
# ----- Locales ----- #
# Install locales and configure
apt-get install -y locales
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
# ----------------- Python -----------------
# Update package lists
apt-get update
# Install necessary packages
apt-get install -y ssh locales git
# Configure locale
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
locale-gen
# Git configuration
git config --global --add safe.directory /workspaces/sentinel
# Install Python package in editable mode
pip install --editable .
# Stash any changes before rebuilding the container
git stash push -m "Stashed changes before (re)building the container"
git stash apply 0
# ----------------- Docker -----------------
apt-get update && apt-get install -y docker.io && apt-get clean -y
# ----------------- Google Cloud SDK -----------------
# Install prerequisites for Google Cloud SDK
apt-get install -y apt-transport-https ca-certificates gnupg curl
# Import the Google Cloud public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | gpg --dearmor -o /usr/share/keyrings/cloud.google.gpg
# Add the Google Cloud SDK repository
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list
# Update package lists again with new repository
apt-get update
# Install Google Cloud CLI
apt-get install -y google-cloud-cli
# Authenticate Docker with Google Cloud
gcloud auth configure-docker -q gcr.io
# gcloud auth login --project <sentinel> --no-launch-browser
|