Netflix / metaflow-service

:rocket: Metadata tracking and UI service for Metaflow!
http://www.metaflow.org
Apache License 2.0
192 stars 71 forks source link

How to run this project #343

Open JanPalasek opened 1 year ago

JanPalasek commented 1 year ago

Hello, I want to run this project to try out the UI service with metaflow-ui. I tried the following approaches:

$ docker compose up -d
Error response from daemon: No such image: metadata_service:latest

Is the image private or something like that? I tried to build the metadata-service from the Dockerfile (docker image build -t "metadata-service" -f "Dockerfile.metadata_service") and then use it with the docker compose, but it didn't work. However the production image doesn't seem to have the UI service, at least from what I understand.

I also tried the development buidl:

$ MF_METADATA_PORT=8090 docker compose -f docker-compose.development.yml up -d

I needed to switch ports because 8080 is occupied by Jenkins. This worked, however when I tried to view any website, it returns 404, even when I go inside the container and execute it there.

Can you help me to tell me what I'm doing wrong? I just need to get Metaflow-UI service working to get working Metaflow UI.

gh4n commented 1 year ago

You can pull the image from docker hub: https://hub.docker.com/r/netflixoss/metaflow_metadata_service. You build and tag the image locally and then specify it in the docker-compose.yml. For testing purposes you also specify the image location as the remote url. Example below:

version: "3"
services:
  metadata:
    image: "netflixoss/metaflow_metadata_service:latest"
    restart: always
    container_name: "metadata_service"
    ports:
      - "${MF_MIGRATION_PORT:-8082}:${MF_MIGRATION_PORT:-8082}"
      - "${MF_METADATA_PORT:-8080}:${MF_METADATA_PORT:-8080}"
    volumes:
      - .:/code
    environment:
      - MF_METADATA_DB_HOST=db
      - MF_METADATA_DB_PORT=5432
      - MF_METADATA_DB_USER=postgres
      - MF_METADATA_DB_PSWD=postgres
      - MF_METADATA_DB_NAME=postgres
      - MF_MIGRATION_ENDPOINTS_ENABLED=1
      - MF_METADATA_PORT=${MF_METADATA_PORT:-8080}
      - MF_METADATA_HOST=${MF_METADATA_HOST:-0.0.0.0}
      - MF_MIGRATION_PORT=${MF_MIGRATION_PORT:-8082}
    links:
      - db
  db:
    image: "postgres:11"
    restart: always
    container_name: "my_postgres"
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: postgres
    ports:
      - "5432:5432"
    volumes:
      - my_dbdata:/var/lib/postgresql/data2
volumes:
  my_dbdata: