# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## Treebeard Container Setup
#
# This notebook is the first to run when the container starts.
#
# It can be used to set env vars and install secrets which can be used to connect to APIs and pull down data too large or sensitive to include in the image.
#
# You can pass in secrets using the `notebook-vars` input on the treebeard action
#
# Because this is the most awkward to use and cannot be cached only use it when you rely on scripts to set variables or work with data which cannot be handled in the container because it is too large/private.
#

# +
from viresclient import set_token
import os

set_token(
    "https://vires.services/ows", set_default=True, token=os.getenv("TB_VIRES_TOKEN"),
)
set_token(
    "https://staging.viresdisc.vires.services/ows", token=os.getenv("TB_VIRES_TOKEN_STAGINGDISC"),
)
set_token(
    "https://staging.vires.services/ows", token=os.getenv("TB_VIRES_TOKEN_STAGING"),
)
# -

from treebeard.helper import shell


shell("pip install MagneticModel/eoxmagmod")

shell("pip install swarmpyfac")

StarcoderdataJupyterScriptsDedupFiltered