Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

meme-search

> 数据库
Open source

The open source Meme Search Engine and Finder. Free and built to self-host locally with Python, Ruby, and Docker.

708 stars0 likes2 views
WebsiteGitHub

About

The open source Meme Search Engine and Finder. Free and built to self-host locally with Python, Ruby, and Docker.

A Meme Search Engine built to self-host in Python, Ruby, and Docker

Use AI to index your memes by their content and text, making them easily retrievable for your meme warfare pleasures.

By default, processing from image-to-text extraction, to vector embedding, to search is performed locally. You can also use an OpenAI-compatible vision API for description generation while keeping embeddings and search local.

Visit the Meme Search project site for a visual feature overview, or continue below for installation and configuration details.

Search beyond the web app. Meme Search now includes a documented, token-authenticated Search API v1, a dependency-free local CLI, and an experimental unpacked Chromium popup. The API is read-only and officially supported on loopback; it also gives community integrations a stable boundary that does not expose your database.

Watch the 16-second app-and-CLI demo.

This repository contains the services and web app for indexing, searching, and retrieving your memes with semantic and keyword search.

Quick start

bash
git clone https://github.com/meme-search/meme-search.git
cd meme-search
docker compose up

Open , then drag, drop, or paste images on the upload page. The first local description generation downloads the selected model, so it takes longer than later generations.

The web UI binds to 127.0.0.1 by default because it does not include user authentication. Official support is loopback-only for API v1 and the included clients. API bearer tokens protect only the versioned integration endpoints; they do not protect the web UI or settings. Direct public exposure is unsupported. Proxy/VPN operation is advanced and unsupported; its authentication, TLS, and network controls are entirely the operator's responsibility.

A table of contents for the remainder of this README:

  • Meme search

    • Features
    • Requirements
    • Installation instructions
    • Time to first generation / downloading models
    • Index your memes
    • Search API and local integrations
    • Custom bind address and app port
    • Building the app locally with Docker
    • Running tests
  • Discord server

  • Changelog

  • Feature requests and contributing

Meme search

Features

Features of Meme Search include:

  1. Multiple Image-to-Text Models

    Choose the right size image to text model for your needs / resources - from small (~200 Million parameters) to large (~2 Billion parameters).

    Current available image-to-text models for Meme Search include the following, starting with the default model:

    • Florence-2-base - a popular series of small vision language models built by Microsoft, including a 250 Million (base) and a 700 Million (large) parameter variant. *This is the default model used in Meme Search*.
    • Florence-2-large - the 700 Million parameter vision language model variant of the Florence-2 series
    • SmolVLM-256 - a 256 Million parameter vision language model built by Hugging Face
    • SmolVLM-500 - a 500 Million parameter vision language model built by Hugging Face
    • Moondream2 - a 2 Billion parameter vision language model used for image captioning / extracting image text
    • Moondream2-INT8 - INT8 quantized version of Moondream2 for memory-constrained hardware. Reduces memory from ~5GB to ~1.5-2GB with minimal quality loss. Ideal for CPU-only machines.
  2. Auto-Generate Meme Descriptions

    Target specific memes for auto-description generation (instead of applying to your entire directory).

  3. Manual Meme Description Editing

    Edit or add descriptions manually for better search results, no need to wait for auto-generation if you don't want to.

  4. Tags

    Create, edit, and assign tags to memes for better organization and search filtering.

  5. Fast Vector Search

    Powered by Postgres and pgvector, enjoy faster keyword and vector searches with streamlined database transactions.

  6. Directory Paths

    Organize your memes across multiple subdirectories—no need to store everything in one folder.

  7. New Organizational Tools

    Filter by tags, directory paths, and description embeddings, plus toggle between keyword and vector search for more control.

  8. Bulk Description Generation

    Generate descriptions for multiple memes at once for faster indexing.

  9. Dark Mode

    Toggle between light and dark themes for comfortable viewing in any environment.

  10. Directory Rescan

Automatically detect and index new memes added to your directories.

  1. Drag-and-Drop Upload

Upload memes directly through the web interface with drag-and-drop and clipboard paste support. Files are stored in the direct-uploads directory (configurable via Docker volume mount) and automatically scanned for indexing. Supports JPG, PNG, WEBP, and GIF formats with bulk upload (up to 50 files), real-time progress tracking, and automatic duplicate filename handling. Animated GIFs remain animated when displayed; descriptions and search indexing use the first frame.

Requirements

For Docker deployment (recommended):

  • Docker and Docker Compose

For local development:

  • Ruby 3.4.2
  • Rails 8.0.4
  • Python 3.12
  • Node.js 20 LTS
  • PostgreSQL 17 with pgvector extension

We recommend using mise for managing Ruby, Python, and Node.js versions. See CLAUDE.md for detailed setup instructions.

Installation instructions

From the repository root, start the server cluster with Docker Compose:

bash
docker compose up

This pulls and starts containers for the app, database, Solid Queue job worker, and local auto description generator. The app runs on port 3000 and is available locally at:

bash
http://localhost:3000

The Compose files store app data in local bind-mounted directories so upgrades keep using the same files:

  • ./meme_search/db_data/meme-search-db for Postgres data
  • ./meme_search/direct-uploads for drag-and-drop uploads
  • ./meme_search/db_data/image_to_text_generator for generator queue data
  • ./meme_search/models for model downloads

Most Docker installations create missing bind-mount directories automatically. Some Docker frontends, including Synology Container Manager, require the directories to exist before startup. Compose also runs a short setup container at startup to make the upload directory writable by the non-root Rails containers, so the configured upload path may be owned by UID/GID 1000 after the first run.

If you want these persistent files visible on a NAS path, set the storage path variables in .env or directly in your Compose UI:

bash
MEME_SEARCH_DB_PATH=/volume1/docker/meme-search/db
MEME_SEARCH_DIRECT_UPLOADS_PATH=/volume1/docker/meme-search/direct-uploads
MEME_SEARCH_GENERATOR_DB_PATH=/volume1/docker/meme-search/image-to-text-db
MEME_SEARCH_MODELS_PATH=/volume1/docker/meme-search/models

For Docker frontends that require bind-mount directories to exist first, create them before starting:

bash
mkdir -p ./meme_search/db_data/meme-search-db ./meme_search/direct-uploads ./meme_search/db_data/image_to_text_generator ./meme_search/models
mkdir -p /volume1/docker/meme-search/db /volume1/docker/meme-search/direct-uploads /volume1/docker/meme-search/image-to-text-db /volume1/docker/meme-search/models

To start the app alone pull the repo and cd into the meme_search/meme_search/meme_search_app. Once there execute the following to start the app in development mode

bash
./bin/dev

When doing this ensure you have an available Postgres instance running locally on port 5432.

Note Linux users: you may need to add the following extra_hosts to your meme_search service for inter-container communication

bash
extra_hosts:
    - "host.docker.internal:host-gateway"

Time to first generation / downloading models

The first auto generation of description of a meme takes longer than average, as image-to-text model weights are downloaded and cached. Subsequent generations are faster.

You can download additional models in the settings tab of the app.

Description generation providers

Meme Search supports two providers for automatic meme descriptions:

  • IMAGE_DESCRIPTION_PROVIDER=local uses the bundled Python image_to_text_generator service. This is the default and keeps description generation local.
  • IMAGE_DESCRIPTION_PROVIDER=openai calls an OpenAI-compatible /chat/completions vision API directly from Rails. In this mode the Python generator service is not required.

Descriptions from every provider are normalized to the app's description length limit before saving. Bulk generation queues durable Solid Queue background jobs for external providers so the web request does not wait on one API request per image.

When an external provider is selected, images chosen for description generation are sent to the configured API endpoint. Embeddings, metadata, and search remain local.

For OpenAI-compatible mode, set these environment variables in your .env file:

bash
IMAGE_DESCRIPTION_PROVIDER=openai
OPENAI_API_BASE_URL=https://api.openai.com/v1
OPENAI_API_KEY=your_api_key
OPENAI_VISION_MODEL=gpt-4o-mini

Then start Rails, the Solid Queue worker, and the database without the Python generator:

bash
docker compose -f docker-compose.yml -f docker-compose.openai.yml up meme_search meme_search_jobs meme_search_db

To smoke-test a real OpenAI-compatible call before starting a bulk run, run this from the Rails app directory:

bash
cd meme_search/meme_search_app
OPENAI_API_KEY=your_api_key mise exec -- bin/smoke_openai_description

The smoke test uses the first indexed sample image that exists under public/memes, runs the same job/provider path as background generation, and rolls back database changes after the API call succeeds.

For local inference mode, keep the default docker compose up command so the image_to_text_generator service starts and can access the same meme volumes as Rails.

Index your memes

You can index your memes by creating your own descriptions, or by generating descriptions automatically, as illustrated below.

To start indexing your own memes, first adjust the compose file by adding volume mount to the meme_search and image_to_text_generator services to properly connect your local meme subdirectory to the app.

For example, if suppose (one of your) meme directories was called new_memes and was located at the following path on your machine: /local/path/to/my/memes/new_memes.

To properly mount this subdirectory to the meme_search service adjust the volumes portion of its configuration to the following:

…

sh APP_BIND_ADDRESS=127.0.0.1 APP_PORT=3000

…

sh docker compose -f docker-compose-local-build.yml up --build


For multi-platform builds (AMD64 + ARM64) and pushing to GitHub Container Registry, use the local build script:

```sh
bash scripts/build_and_push.sh

This will build the docker images for

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubyaidockerhomelabmachine-learning

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库