Upload docker/start.sh with huggingface_hub
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970#!/bin/bashset -e # Exit the script if any statement returns a non-true return value
# ref https://github.com/runpod/containers/blob/main/container-template/start.sh
# ---------------------------------------------------------------------------- ## Function Definitions ## ---------------------------------------------------------------------------- #
# Setup sshsetup_ssh() { if [[ $PUBLIC_KEY ]]; then echo "Setting up SSH..." mkdir -p ~/.ssh echo "$PUBLIC_KEY" >> ~/.ssh/authorized_keys chmod 700 -R ~/.ssh
if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -q -N '' echo "RSA key fingerprint:" ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub fi
if [ ! -f /etc/ssh/ssh_host_dsa_key ]; then ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -q -N '' echo "DSA key fingerprint:" ssh-keygen -lf /etc/ssh/ssh_host_dsa_key.pub fi
if [ ! -f /etc/ssh/ssh_host_ecdsa_key ]; then ssh-keygen -t ecdsa -f /etc/ssh/ssh_host_ecdsa_key -q -N '' echo "ECDSA key fingerprint:" ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub fi
if [ ! -f /etc/ssh/ssh_host_ed25519_key ]; then ssh-keygen -t ed25519 -f /etc/ssh/ssh_host_ed25519_key -q -N '' echo "ED25519 key fingerprint:" ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub fi
service ssh start
echo "SSH host keys:" for key in /etc/ssh/*.pub; do echo "Key: $key" ssh-keygen -lf $key done fi}
# Export env varsexport_env_vars() { echo "Exporting environment variables..." printenv | grep -E '^RUNPOD_|^PATH=|^_=' | awk -F = '{ print "export " $1 "=\"" $2 "\"" }' >> /etc/rp_environment echo 'source /etc/rp_environment' >> ~/.bashrc}
# ---------------------------------------------------------------------------- ## Main Program ## ---------------------------------------------------------------------------- #
echo "Pod Started"
setup_sshexport_env_varsecho "Starting AI Toolkit UI..."cd /app/ai-toolkit/ui && npm run start docker/start.shAdded+70