Agenta-AI / agenta

The all-in-one LLM developer platform: prompt management, evaluation, human feedback, and deployment all in one place.
http://www.agenta.ai
MIT License
1.26k stars 186 forks source link

[Bug] agenta-web failed to build in deployment mode #1970

Closed mrunhap closed 3 weeks ago

mrunhap commented 3 months ago

Describe the bug I want start it in deployment mode and run the command

docker compose -f "docker-compose.yml" up -d --build

But agenta-web build failed:

Building agenta-web
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
            Install the buildx component to build images with BuildKit:
            https://docs.docker.com/go/buildx/

Sending build context to Docker daemon  3.612MB
Step 1/18 : FROM node:22-alpine3.18 AS base
22-alpine3.18: Pulling from library/node
619be1103602: Already exists
ae4da564de46: Pull complete
fe157b9a4030: Pull complete
a0f9e84b5e64: Pull complete
Digest: sha256:303dec48be59e127b9166900a5548dcc36e070a50e0b1604f1324787f92fd900
Status: Downloaded newer image for node:22-alpine3.18
 ---> 6d3738328705
Step 2/18 : WORKDIR /app
 ---> Running in f9d0c7712baa
Removing intermediate container f9d0c7712baa
 ---> 89591f66282c
Step 3/18 : COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
 ---> a8e4ea28afd0
Step 4/18 : RUN     if [ -f yarn.lock ]; then yarn install --frozen-lockfile;     elif [ -f package-lock.json ]; then npm install;     elif [ -f pnpm-lock.yaml ]; then npm install -g pnpm && pnpm install;     else yarn install;     fi
 ---> Running in 697fc4608bd6
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.

added 1163 packages, and audited 1164 packages in 7m

307 packages are looking for funding
  run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
npm notice
npm notice New minor version of npm available! 10.7.0 -> 10.8.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
npm notice To update run: npm install -g npm@10.8.2
npm notice
Removing intermediate container 697fc4608bd6
 ---> c110e748cadd
Step 5/18 : COPY src ./src
 ---> 64d730f290fa
Step 6/18 : COPY public ./public
 ---> 6d6579f074f5
Step 7/18 : COPY next.config.js .
 ---> 8415942e8d87
Step 8/18 : COPY tsconfig.json .
 ---> 0ce55f75fb9b
Step 9/18 : COPY postcss.config.js .
 ---> 974f614d089b
Step 10/18 : COPY tailwind.config.ts .
 ---> 0d80e9afb320
Step 11/18 : COPY .env .
 ---> 0d345e7e18d8
Step 12/18 : COPY sentry.* .
COPY failed: no source files were specified
ERROR: Service 'agenta-web' failed to build : Build failed

To Reproduce Steps to reproduce the behavior:

  1. git clone https://github.com/Agenta-AI/agenta.git
  2. cd agenta
  3. docker compose -f "docker-compose.yml" up -d --build
dosubot[bot] commented 3 months ago

@mrunhap Hello there! I'm here to assist you with any bugs, questions, or contributions you have. Let's tackle this together!

The issue you're encountering while trying to build the agenta-web service using Docker Compose is due to a failure in the Docker build process. Specifically, the error message indicates that the COPY sentry.* . command failed because no source files were specified. This suggests that the expected sentry files are missing from the context being sent to the Docker daemon.

To resolve this, ensure that the sentry.* files are present in the root directory of your project before running the Docker command. If these files are not needed, you can remove or comment out the COPY sentry.* . line in the Dockerfile:

# COPY sentry.* .

Additionally, consider addressing the deprecation warning regarding the legacy builder by installing the buildx component as recommended in the Docker documentation.

For reference, here is the relevant part of the Dockerfile:

# used in cloud 
COPY sentry.* .

Make sure that the sentry.* files (e.g., sentry.config.js, sentry.client.config.js, etc.) are located in the same directory as your Dockerfile or within the build context directory. If these files are missing, the COPY command will fail [1][2][3].

To continue talking to Dosu, mention @dosu.

mmabrouk commented 3 weeks ago

Hey @mrunhap , can you please confirm whether this issue is still open