whitelightning icon indicating copy to clipboard operation
whitelightning copied to clipboard

Improve docker instructions

Open bradflaugher opened this issue 1 year ago • 1 comments

Set up your environment:

cp .env.example .env

Edit .env with your API keys

Run the classifier agent:

docker run --rm -v $(pwd)/models:/app/models -v $(pwd)/.env:/app/.env ghcr.io/whitelightning-ai/whitelightning:latest -p="Classify customer feedback as positive or negative sentiment" --model-type="tensorflow" --refinement-cycles=1 --generate-edge-cases="true" --lang="english"

There are two big issues with this...

  1. it all needs to work in one line... so none of this cp .env.example .env thing
  2. Don't assume I checked out your repository... $(pwd)/models will not exist!
  3. Pass the environment variable in directly, this takes two seconds to do... docker run -e OPENROUTER_API_KEY="sn-k-124142whatever" my_image the -e flag works like magic.

bradflaugher avatar Jun 09 '25 20:06 bradflaugher

Also your docker command doesn't make any sense... see

root@vultr:~# docker run --rm \
        -e OPENROUTER_API_KEY="sk-xxxxxxxxxxxxxxx" \
        -v ${pwd}:/app/models \
        -v ghcr.io/whitelightning-ai/whitelightning:latest \
        -p="Classify customer feedback as positive or negative sentiment" \
        --model-type="tensorflow" \
        --refinement-cycles=1 \
        --generate-edge-cases="true" \
        --lang="english"
unknown flag: --model-type

Usage:  docker run [OPTIONS] IMAGE [COMMAND] [ARG...]

Run 'docker run --help' for more information
root@vultr:~# 

note that you are missing the [COMMAND] part... something like python or whatever you had before. please test this

bradflaugher avatar Jun 09 '25 20:06 bradflaugher