Skip to content

Instantly share code, notes, and snippets.

@RemiRigal
Last active July 31, 2020 07:19
Show Gist options
  • Save RemiRigal/49dc6b65c40fa04ffb2453296677bb2c to your computer and use it in GitHub Desktop.
Save RemiRigal/49dc6b65c40fa04ffb2453296677bb2c to your computer and use it in GitHub Desktop.
How to easily setup Sacred + Omniboard + Mongoku using docker-compose.

Sacred

The opensource tool Sacred helps configuring, organizing, logging and reproducing experiments in Deep Learning projects. It's a Python package allowing to log data in a MongoDB database, among others.

Install Sacred:

pip install sacred

The documentation is hosted on ReadTheDocs.

Omniboard and Mongoku

Two particularly useful tools for Sacred:

  • The web tool Omniboard allows to visualize logged experiments within a browser.
  • The web tool Mongoku allows to browse/edit a MongoDB database.

Docker-Compose file

For the sake of simplicity and stability, all these tools may be setup using docker-compose.

# docker-compose.yml

version: '3'
services:

  mongo:
    image: mongo
    ports:
      - {IP_ADDRESS}:27017:27017
    environment:
      MONGO_INITDB_ROOT_USERNAME: user
      MONGO_INITDB_ROOT_PASSWORD: password
      MONGO_INITDB_DATABASE: sacred
    expose:
      - 27017
    networks:
      - omniboard
    restart: always
    volumes:
      - ./mongo:/data/db

  omniboard:
    image: vivekratnavel/omniboard:latest
    command: ["--mu", "mongodb://user:password@mongo:27017/sacred?authSource=admin"]
    ports:
      - {IP_ADDRESS}:9000:9000
    networks:
      - omniboard
    depends_on:
      - mongo
    restart: always

  mongoku:
    image: huggingface/mongoku
    networks:
      - omniboard
    ports:
      - {IP_ADDRESS}:3100:3100
    expose:
      - 3100
    environment:
      MONGOKU_DEFAULT_HOST: "mongodb://user:password@mongo:27017/?authMechanism=SCRAM-SHA-1"
    depends_on:
      - mongo
    restart: always

networks:
  omniboard:

Replace {IP_ADDRESS} with the host's IP.
The Omniboard's page is accessible on port 9000, Mongoku's page on port 3100.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment