This guide provides step-by-step instructions for building the Model Download Microservice from source.
Before you begin, ensure that you have the following prerequisites:
- Docker installed on your system: Installation Guide.
-
Clone the Repository:
- Clone the model-download repository:
# Clone the latest on mainline git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries # Alternatively, Clone a specific release branch git clone https://github.com/open-edge-platform/edge-ai-libraries.git edge-ai-libraries -b <release-tag>
- Clone the model-download repository:
-
Navigate to the directory:
- Go to the model-download microservice directory
cd microservices/model-download
- Go to the model-download microservice directory
-
Configure the environment variables
- Set the below environment variable
export HUGGINGFACEHUB_API_TOKEN=<your huggingface token>
- For using the Geti™ plugin set the below environment variables
export GETI_HOST=<GETI_HOST_ADDRESS> export GETI_TOKEN=<GETI_ACCESS_TOKEN> export GETI_SERVER_API_VERSION=v1 export GETI_SERVER_SSL_VERIFY=False #DEFAULT is FALSE
- Set the below environment variable
-
Build the docker image
- Build the Docker image for the Model Download Microservice:
source scripts/run_service.sh --build
- Build the Docker image for the Model Download Microservice:
-
Run the Docker Container:
- Run the Docker container using the built image:
source scripts/run_service.sh up --plugins all --model-path tmp/models
Note: The above will bring up the service and install the dependencies for all the available plugins. For more details of the options available refer here
- Run the Docker container using the built image:
-
Access the Application:
- Open a browser and go to
http://<host-ip>:8200/api/v1/docsto access the OpenApi spec documentation for the application.
- Open a browser and go to
- Ensure that the application is running by checking the Docker container status:
docker ps
- Access the application dashboard and verify that it is functioning as expected.
- If you encounter any issues during the build or run process, check the Docker logs for errors:
docker logs <container-id>
