forked from devrel-workshop/101-AI-and-py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup_env.sh
executable file
·23 lines (20 loc) · 884 Bytes
/
setup_env.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Get the attendee configuration parameters
curl -u attendee http://162.19.64.158/lab-information -o attendee-conf.json
echo "Downladed parameters:"
cat attendee-conf.json|jq
STUDENT_ID=$(jq -r '.studentId' "attendee-conf.json")
REGISTRY_NAME=ubf2r2if.c1.gra9.container-registry.ovh.net/lab
REGISTRY_LOGIN=$(jq -r '.registryLogin' "attendee-conf.json")
REGISTRY_PASSWORD=$(jq -r '.registryPassword' "attendee-conf.json")
AI_USER=$(jq -r '.username' "attendee-conf.json")
AI_PASSWORD=$(jq -r '.password' "attendee-conf.json")
echo "Your environment variables:"
echo " - STUDENT_ID: " $STUDENT_ID
echo " - REGISTRY_LOGIN: " $REGISTRY_LOGIN
echo " - REGISTRY_LOGIN: " $REGISTRY_PASSWORD
echo " - AI_USER: " $AI_USER
echo " - AI_PASSWORD: " $AI_PASSWORD
# Authentication with AI CLI
ovhai login -u $AI_USER -p $AI_PASSWORD
echo "You are connected with your AI user:"
ovhai me