Table of Contents¶
Build MegaService Docker Image¶
To construct the Megaservice of DocSum, the GenAIExamples repository is utilized. Build MegaService Docker image via command below:
git clone https://github.com/opea-project/GenAIExamples.git
cd GenAIExamples/DocSum
docker build --no-cache -t opea/docsum:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f Dockerfile .
Build UI Docker Image¶
Build frontend Docker image via below command:
cd GenAIExamples/DocSum/ui
docker build -t opea/docsum-ui:latest --build-arg https_proxy=$https_proxy --build-arg http_proxy=$http_proxy -f ./docker/Dockerfile .
Generate a HuggingFace Access Token¶
Some HuggingFace resources, such as certain models, are only accessible if the developer has an access token. If you don’t have a HuggingFace access token, you can create one by registering at HuggingFace and following these steps.
Troubleshooting¶
If you get errors like “Access Denied”, validate micro service first. A simple example:
http_proxy="" curl http://${host_ip}:8008/generate \ -X POST \ -d '{"inputs":" ### System: Please translate the following Golang codes into Python codes. ### Original codes: '\'''\'''\''Golang \npackage main\n\nimport \"fmt\"\nfunc main() {\n fmt.Println(\"Hello, World!\");\n '\'''\'''\'' ### Translated codes:","parameters":{"max_tokens":17, "do_sample": true}}' \ -H 'Content-Type: application/json'
(Docker only) If all microservices work well, check the port ${host_ip}:7777, the port may be allocated by other users, you can modify the
compose.yaml
.(Docker only) If you get errors like “The container name is in use”, change container name in
compose.yaml
.