Get Started Guide#
Time to Complete: 5 - 15 minutes
Programming Language: Python*
Prerequisites#
System Requirement |
Details |
---|---|
Processor |
6th Generation Intel® Core™ processor or above with Intel® HD Graphics, or Intel® Xeon® processor |
RAM |
16 GB |
Hard Drive |
Minimum 64 GB; 128 GB recommended. |
Operating System |
Ubuntu* 22.04 LTS |
Docker* Platform |
Version 24.0.6 and above |
Docker Compose* Tool |
Version 2.21.0 and above |
Step 1: Pull the Docker* image#
Pull the desired Docker image from Docker Hub
docker pull intel/model-registry:1.0.1
Step 2: Run the Microservice#
Create a
.env
file with the following environment variables:HOST_IP_ADDRESS= MR_INSTALL_PATH=/opt/intel/mr ENABLE_HTTPS_MODE=false # Docker security MR_USER_NAME=mruser MR_UID=2025 #PostgreSQL service & client adapter MR_PSQL_HOSTNAME=mr_postgres MR_PSQL_PASSWORD= MR_PSQL_DATABASE=model_registry_db MR_PSQL_PORT=5432 # MinIO service & client MR_MINIO_ACCESS_KEY= MR_MINIO_SECRET_KEY= MR_MINIO_BUCKET_NAME=model-registry MR_MINIO_HOSTNAME=mr_minio MR_MINIO_SERVER_PORT=8000 # Model Registry service MR_VERSION=1.0.1 MR_MIN_LOG_LEVEL=INFO MR_SERVER_PORT=80 # MLflow MR_MLFLOW_S3_ENDPOINT_URL=http://127.0.0.1:8000
Enter the desired values for the REQUIRED Environment Variables in the
.env
file:MR_PSQL_PASSWORD
MR_MINIO_ACCESS_KEY
MR_MINIO_SECRET_KEY
Create directories to be used for persistent storage by the Postgres* and MinIO* Docker containers
set -a source .env set +a mkdir -p $MR_INSTALL_PATH/data/mr_postgres mkdir -p $MR_INSTALL_PATH/data/mr_minio useradd -u $MR_UID $MR_USER_NAME chown -R $MR_USER_NAME:$MR_USER_NAME $MR_INSTALL_PATH/data/mr_postgres $MR_INSTALL_PATH/data/mr_minio
Note: The data in these directories will persist after the containers are removed. If you would like to subsequently start the containers with no pre-existing data, delete the contents in the directories before starting the containers.
Create a
docker-compose.yml
file with the following configurations:services: model_registry: image: intel/model-registry:${MR_VERSION} container_name: model-registry hostname: model-registry ipc: "none" ports: - "${HOST_IP_ADDRESS}:32002:${MR_SERVER_PORT}" restart: unless-stopped deploy: resources: limits: memory: 4096mb cpus: '0.30' pids: 200 reservations: memory: 2048mb cpus: '0.15' security_opt: - no-new-privileges healthcheck: test: ["CMD-SHELL", "exit", "0"] environment: AppName: "ModelRegistry" MIN_LOG_LEVEL: ${MR_MIN_LOG_LEVEL} ENABLE_HTTPS_MODE: ${ENABLE_HTTPS_MODE} MLFLOW_TRACKING_URI: postgresql+psycopg2://${MR_USER_NAME}:${MR_PSQL_PASSWORD}@mr_postgres:${MR_PSQL_PORT}/${MR_PSQL_DATABASE} MLFLOW_S3_ENDPOINT_URL: ${MR_MLFLOW_S3_ENDPOINT_URL} MINIO_HOSTNAME: ${MR_MINIO_HOSTNAME} MINIO_SERVER_PORT: ${MR_MINIO_SERVER_PORT} MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY} MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY} MINIO_BUCKET_NAME: ${MR_MINIO_BUCKET_NAME} SERVER_PORT: ${MR_SERVER_PORT} LSHOST: host.docker.internal SERVER_CERT: /run/secrets/ModelRegistry_Server/public.crt CA_CERT: /run/secrets/ModelRegistry_Server/server-ca.crt SERVER_PRIVATE_KEY: /run/secrets/ModelRegistry_Server/private.key no_proxy: mr_minio NO_PROXY: mr_minio volumes: - ./Certificates/ssl/:/run/secrets/ModelRegistry_Server:ro extra_hosts: - "host.docker.internal:host-gateway" networks: - mr mr_postgres: image: postgres:13 container_name: mr_postgres hostname: mr_postgres restart: unless-stopped security_opt: - no-new-privileges environment: AppName: "ModelRegistry" POSTGRES_USER: ${MR_USER_NAME} POSTGRES_PASSWORD: ${MR_PSQL_PASSWORD} POSTGRES_DB: ${MR_PSQL_DATABASE} volumes: - ${MR_INSTALL_PATH}/data/mr_postgres:/var/lib/postgresql/data expose: - ${MR_PSQL_PORT} user: "${MR_UID}:${MR_UID}" networks: - mr mr_minio: image: minio/minio:RELEASE.2020-12-12T08-39-07Z container_name: mr_minio hostname: mr_minio ipc: "none" expose: - ${MR_MINIO_SERVER_PORT} volumes: - ./Certificates/ssl/:/certs/:rw - ${MR_INSTALL_PATH}/data/mr_minio:/data networks: - mr restart: unless-stopped security_opt: - no-new-privileges environment: MR_USER_NAME: ${MR_USER_NAME} MINIO_ACCESS_KEY: ${MR_MINIO_ACCESS_KEY} MINIO_SECRET_KEY: ${MR_MINIO_SECRET_KEY} command: server --address ":8000" --certs-dir /certs /data networks: mr: driver: bridge
Start and run the defined services in the
docker-compose.yml
file as Docker* containersdocker compose up -d
For a quick introduction to the core functionality of the Model Registry microservice, refer to the Tutorials.
Summary#
In this get started guide, you learned how to download and run the Model Registry microservice.
Learn More#
Deploy the model registry microservice in minutes using the Get Started Guide for Helm Deployment.
Understand the components, services, high level and architecture in the Overview.
Review supported environment variables in the Environment Variables documentation.
Troubleshooting#
If the model registry does not start or is not functioning as expected, review the logs.
Error Logs#
To see the logs, run the following command from the host system terminal:
docker logs -f model_registry
To filter out all log messages except errors, run the following command:
docker logs -f model_registry | grep -i error
Legal Information#
Intel, the Intel logo, and Xeon are trademarks of Intel Corporation in the U.S. and/or other countries.
*Other names and brands may be claimed as the property of others.