Setup Sbert_eduplex
Setup Sbert_eduplex
Directory structure:
The file called
server.py
is the main file to run the application.env
should be used to write down the initial parameters of the application. Logs should be automatically created.requirements.txt
contains 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/Dockerfile
for a quick build without updating pip dependencies ordocker/Dockerfile
for 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
(changeprdedupl
with the name of your aws cli ordefault
if 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:
Last updated