Setup Sbert_eduplex
Setup Sbert_eduplex
Directory structure:
The file called
server.pyis the main file to run the application.envshould be used to write down the initial parameters of the application. Logs should be automatically created.requirements.txtcontains the requirements
How to develop sbert with docker
Run
docker-compose-socket-sbert.yml(change the image version to force a rebuild)This will make the service available in localhost:5000 without SSL
How to build sbert service for production
Change the image version in
docker-compose-sbert.yml(optionally use dockerfiledocker/child/Dockerfilefor a quick build without updating pip dependencies ordocker/Dockerfilefor a slower build from empty image)Run docker-compose up will create a new version tagged image
Login to AWS ECR
aws ecr-public get-login-password --region us-east-1 --profile prdedupl | docker login --username AWS --password-stdin public.ecr.aws/eduplex_api(changeprdeduplwith the name of your aws cli ordefaultif you do not have many profiles)Push the image
docker push <image_tag>(image_tag from yml file)
technical notes
in pycharm there may be problems with dockers permissions, after locally installing Dockers and pycharm plugin, the following may be needed:
sudo chmod a+rwx /var/run/docker.sock
sudo chmod a+rwx /var/run/docker.pidLast updated