In order for the w3l infra to work we will need a couple of things
- soccomm-videos-<stage>-db
- soccomm-videos-<stage>-input
- soccomm-videos-<stage>-output (make this one public for reading and no cors)
- soccomm-videos-<stage>-process
- w2l-checkpoints (same for any stage)
We now use the g5-impaired template on aws
- OS is Amazon Linux 2 (based on centos)
Make sure to add inbound rules to expose ports.
On AWS, create or edit the instance security group and add the following inbound rule:
Port range
:0 - 65535
protocol
:TCP
Source
:0.0.0.0/0
We need the following environment variables (ask Alex for those you dont have)
AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID
AWS_S3_BUCKET_DB
AWS_S3_BUCKET_INPUT
AWS_S3_BUCKET_OUTPUT
ALANA_SUBSCRIPTION_KEY
CHATBOT2GO_SUBSCRIPTION_KEY
VOICEFLOW_SUBSCRIPTION_KEY
OPENAI_SUBSCRIPTION_KEY
APIAUDIO_SUBSCRIPTION_KEY
APIAUDIO_SUBSCRIPTION_KEY_STAGING
AZURE_SUBSCRIPTION_KEY
Clone both of these repos and their gitmodules. You will need to configure git on the instance or forward your key through ssh when connecting to it.
git clone --recurse-submodules git@github.com:aflorithmic/soccomm_api_container.git
Mount storage on /space
Note: This space directory is ephemeral, which means that it will not preserve state on reboot or shut down.
mkdir space
sudo mkfs.ext4 /dev/nvme1n1
sudo mount /dev/nvme1n1 space
cd space
git clone --recurse-submodules git@github.com:aflorithmic/soccomm-w2l-test.git
sudo yum install certbot
sudo certbot certonly --standalone --register-unsafely-without-email
If not able to install directly, refer here
The certificate will be under /etc/letsencrypt/live/<domain>/
add permissions
sudo chmod 755 /etc/letsencrypt/*
sudo chmod 644 /etc/letsencrypt/archive/<domain>/privkey1.pem
sudo iptables -t nat -I PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8000
screen
cd soccomm_api_container
sh build.sh
mkdir index demo2
sh devel.sh
cd soccomm_api
vi run.sh (edit the file and change the certificate paths to point to the correct domain)
sh run.sh
press ctrl+a
then c
to create a new screen (you can now switch between them using ctrl+a
then n
cd space/soccomm-w2l-test
sh build.sh
mkdir alpha_transitions inputs outputs processed
sh devel.sh
cd devel
sh install-w3l.sh
sh start.sh
- index: https://github.com/aflorithmic/soccomm-head-index should go to
soccomm_api_container/index
- demo2: https://github.com/aflorithmic/soccomm-ui-4 should go to
soccomm_api_container/demo2