Using the fastAPI to build it
Zip : here
git: git clone https://github.com/KeithLin724/Book-To-Comics.git
install Docker and Docker-compose
# first cd to api
cd api
# second open the docker '-d mean open in background'
docker-compose up --build -d
# or use this command (after build)
docker-compose up -d
# check the log
docker-compose logs -f
# check the api_server log, ctrl+c exit
docker logs -f api_server_1
# close
cd api
docker-compose down
In api
folder is a main server for handler other service, such as chat
, text_to_image
In api_cuda
folder is a text_to_image server, for provide text to image service
You need to make ./api_cuda/.env
file
LAB_SERVER_IP={YOUR_CONNECT_SERVER_IP}
LAB_SERVER_PORT=5000
HOST_IP={YOUR_HOST_IP}
In chat
folder, we put a example app for test the server
# go to folder
cd chat
# install some need
pip install -r ./requirement.txt
# go to src
cd src
# run app
python ./app.py
You need to make a./chat/src/.env
SERVER_IP={your_server_ip}
SERVER_PORT=5000
You need to allow
port | function |
---|---|
5000 | main API |
6379 | redis Database |
8001 | redis Database Webpage Monitor |
4080 | Text-to-image API |