Skip to content

Quick‐Start

Robin Tuszik edited this page Sep 12, 2024 · 2 revisions

Docker

Option 1: Docker Compose:

  1. Ensure you have Docker and Docker Compose installed on your system.

  2. Create a new directory for the project and navigate to it.

  3. Create a docker-compose.yml file with the following content:

    services:
      replicate-flux-lora:
        image: ghcr.io/rtuszik/replicate-flux-lora:latest
        container_name: replicate-flux-lora
        ports:
          - "8080:8080"
        volumes:
          - ${HOST_OUTPUT_DIR}:/app/output
          - replicate-flux-lora-settings:/app/settings
        restart: unless-stopped
    
    volumes:
      replicate-flux-lora-settings:
  4. Set the HOST_OUTPUT_DIR environment variable to the path where you want to save generated images.

  5. Run the application:

    docker-compose up -d
  6. Access the application at http://localhost:8080

Note: If you prefer to store settings on the host instead of using a Docker volume, replace the replicate-flux-lora-settings:/app/settings line with ${HOST_SETTINGS_DIR}:/app/settings and remove the volumes: section at the bottom. Then, set the HOST_SETTINGS_DIR environment variable to your desired host directory path.

Option 2: Docker Run:

If you prefer to use docker run, you can use the following command:

docker run -d \
  --name replicate-flux-lora \
  -p 8080:8080 \
  -v /path/to/your/output/directory:/app/output \
  -v replicate-flux-lora-settings:/app/settings \
  ghcr.io/rtuszik/replicate-flux-lora:latest

Replace /path/to/your/output/directory with the actual path where you want to save generated images.

Accessing the Application

After running either command, access the application at http://localhost:8080

Retrieving Replicate API-Key

Getting Started