Sign inSign up

kensobi/ml_service

By kensobi

Updated over 3 years ago

Machine Learning Service

Image
0

116

kensobi/ml_service repository overview

How to run the Service

The Python service requires a Redis connection. The easiest way to set this up is by using docker-compose.

You must provide the following environment variables (see the example .env file below):

PYTHON_PORT=8080
PYTHON_PUBLIC_PORT=9090
API_KEY=debug-key
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=NxtCOnt4IA
PYTHON_WORKERS=4

docker-compose.yml:

services:
  redis:
    image: docker.io/bitnami/redis:latest
    restart: unless-stopped
    environment:
      - ALLOW_EMPTY_PASSWORD=no
      - REDIS_PASSWORD=${REDIS_PASSWORD}
      - REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
      - REDIS_PORT=${REDIS_PORT}
    ports:
      - "${REDIS_PORT}:${REDIS_PORT}"
    volumes:
      - "redis_data:/bitnami/redis/data"
  python:
    depends_on:
      - redis
    image: kensobi/ml_service:dev
    restart: unless-stopped
    environment:
      - PYTHON_PORT=${PYTHON_PORT}
      - REDIS_HOST=${REDIS_HOST}
      - REDIS_PORT=${REDIS_PORT}
      - REDIS_PASSWORD=${REDIS_PASSWORD}
      - API_KEY=${API_KEY}
      - PYTHON_WORKERS=${PYTHON_WORKERS}
    ports:
      - ${PYTHON_PUBLIC_PORT}:${PYTHON_PORT}

volumes:
  redis_data:

Tag summary

Content type

Image

Digest

sha256:548d21f26

Size

411.5 MB

Last updated

over 3 years ago

docker pull kensobi/ml_service