helicone icon indicating copy to clipboard operation
helicone copied to clipboard

docker compose error

Open whozwhat opened this issue 1 year ago • 6 comments

$ cd docker $ cp .env.example .env $ docker compose up WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "NEXT_PUBLIC_BASE_PATH" variable is not set. Defaulting to a blank string. WARN[0000] The "NEXT_PUBLIC_BASE_PATH" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_USER" variable is not set. Defaulting to a blank string. WARN[0000] The "MINIO_ROOT_PASSWORD" variable is not set. Defaulting to a blank string. [+] Building 0.0s (0/1)
[+] Building 0.0s (0/1)
[+] Building 0.0s (0/1)
[+] Building 0.0s (0/1)
[+] Building 0.0s (0/1)
[+] Building 0.0s (0/1)
[+] Building 0.2s (2/3)
=> [internal] load .dockerignore 0.0s => => transferring context: 2.19kB 0.0s => [internal] load build definition from dockerfile_worker 0.0s => => transferring dockerfile: 454B 0.0s [+] Building 0.2s (2/3)
=> [internal] load .dockerignore 0.0s => => transferring context: 67B 0.0s => [internal] load build definition from dockerfile_supabase_migration_runner 0.0s => => transferring dockerfile: 371B 0.0s [+] Building 0.2s (2/3)
=> [internal] load build definition from dockerfile_worker 0.0s => => transferring dockerfile: 454B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2.19kB 0.0s [+] Building 0.2s (2/3)
=> [internal] load build definition from dockerfile_worker 0.0s => => transferring dockerfile: 454B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2.19kB 0.0s [+] Building 0.2s (0/2)
=> [internal] load build definition from dockerfile 0.2s => => transferring dockerfile: 703B 0.0s [+] Building 0.6s (2/3)
[+] Building 0.6s (2/3)
=> [internal] load build definition from dockerfile 0.5s => => transferring dockerfile: 703B 0.0s [+] Building 0.6s (2/3)
=> [internal] load build definition from dockerfile_worker 0.5s => => transferring dockerfile: 454B 0.0s [+] Building 1.7s (12/14)
=> [internal] load build definition from dockerfile 0.5s => => transferring dockerfile: 703B 0.0s => [internal] load .dockerignore 0.5s => => transferring context: 158B 0.0s => [internal] load metadata for docker.io/library/node:20 1.2s => [ 1/10] FROM docker.io/library/node:20@sha256:786005cf39792f7046bcd66491056c26d2dbcc669c072d1a1e4ef4fcdddd26eb 0.0s => [internal] load build context 0.0s => => transferring context: 2B 0.0s => CACHED [ 2/10] WORKDIR /usr/src/app/valhalla/jawn 0.0s => ERROR [ 3/10] COPY ./valhalla/jawn/package.json ./valhalla/jawn/yarn.lock ./ 0.0s => CACHED [ 4/10] RUN yarn install 0.0s => CACHED [ 5/10] WORKDIR /usr/src/app/shared 0.0s [+] Building 1.7s (3/3) FINISHED
=> [internal] load build definition from dockerfile_worker 0.0s => => transferring dockerfile: 454B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2.19kB 0.0s => CANCELED [internal] load metadata for docker.io/library/node:18.11.0 1.7s [+] Building 1.8s (3/3) FINISHED
=> [internal] load .dockerignore 0.0s => => transferring context: 2.19kB 0.0s => [internal] load build definition from dockerfile_worker 0.0s => => transferring dockerfile: 454B 0.0s => CANCELED [internal] load metadata for docker.io/library/node:18.11.0 1.7s failed to solve: failed to compute cache key: failed to calculate checksum of ref moby::mzjtg51h4dyv4myi1wh95ps0s: "/valhalla/jawn": not found

whozwhat avatar Jul 15 '24 09:07 whozwhat

The file structure described in docker-compose.yml is different from the file structure of the github directory.

  1. Copy the shared directory to the valhalla directory
  2. Create a valhalla folder in the valhalla directory and put /valhalla/jawn in it

Just execute docker compose up again

kenlin1109 avatar Aug 08 '24 09:08 kenlin1109

I just spent an hour trying to figure out why my machine was misbehaving, and instead it was this? Sorry that's a big thing to not include in the docs in bold!

lucacri avatar Aug 15 '24 22:08 lucacri

ProTip: ENABLE_EMAIL_AUTOCONFIRM being set to false in the .env example is also an issue for any self hosters out there who don't have an email sending setup.

iamthemulti avatar Oct 22 '24 18:10 iamthemulti

2. valhalla

Terryfic

Why not not make a PR to add it in the repo ?

Flopsky avatar Oct 27 '24 14:10 Flopsky

Nothing works.

barseghyanartur avatar Nov 21 '24 13:11 barseghyanartur

if anyone comes across this issue, here's a quick fix

update ./docker/docker-compose.yml

...
  jawn:
    container_name: helicone-jawn
    build:
      context: .. # <- edited
      dockerfile: valhalla/dockerfile # <- edited
....

update ./valhalla/dockerfile

# This docker file must be built using the context of it's parent directory
# docker build -t valhalla .. -f dockerfile

# Use an official Node.js runtime as the base image
FROM --platform=linux/amd64 node:20

WORKDIR /usr/src/app/valhalla/jawn

COPY ./valhalla/jawn/package.json ./valhalla/jawn/yarn.lock ./ # <- edited

RUN yarn install

WORKDIR /usr/src/app/shared
COPY ./shared . # <- edited

WORKDIR /usr/src/app/valhalla/jawn
COPY ./valhalla/jawn . # <- edited

RUN find /usr/src/app/valhalla/jawn -name ".env.*" -exec rm {} \;

#yarn workspace jawn serve
ENV PORT=8585

RUN yarn build

ENV DLQ_MESSAGES_PER_MINI_BATCH=1
ENV DLQ_WORKER_COUNT=1
ENV NORMAL_WORKER_COUNT=3

CMD [ "yarn", "serve" ]

koshyviv avatar Nov 27 '24 07:11 koshyviv

Hi - sorry for the delay this PR should fix these issue https://github.com/Helicone/helicone/pull/3195

chitalian avatar Feb 02 '25 00:02 chitalian