my_giskard / hf.sh
elgui's picture
Duplicate from giskardai/giskard
7bfd799 verified
raw
history blame contribute delete
No virus
776 Bytes
#!/bin/bash
echo "Initializing datadir..."
# Create dir if not existed in HF persistent storage
if [ ! -d "${GSK_HOME}" ]
then
# Create HOME
mkdir -p "${GSK_HOME}"
# Create frontend run dir
mkdir -p "${GSK_HOME}/run/nginx"
fi
if [ ! -z "${GISKARD_LICENSE}" ]
then
# Use new license if env set
echo "${GISKARD_LICENSE}" > "${GISKARD_HOME}/license.lic"
fi
# echo "Detecting demo Giskard Space..."
# if [ ! -z "${SPACE_ID}" ] && [ "${DEMO_SPACE_ID}" == "${SPACE_ID}" ]
# then
# # Generate GISKARD_DEFAULT_API_KEY in demo space instead of set from Secrets
# export GISKARD_DEFAULT_API_KEY=gsk-$(cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-28} | head -n 1)
# fi
echo "Starting supervisord..."
exec supervisord -c "${GSK_DIST_PATH}/supervisord.conf"