Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: FixMyCar docker push issue #490

Closed
1 task done
rosquillas opened this issue Apr 3, 2024 · 4 comments · Fixed by #829
Closed
1 task done

[Bug]: FixMyCar docker push issue #490

rosquillas opened this issue Apr 3, 2024 · 4 comments · Fixed by #829
Assignees
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@rosquillas
Copy link

File Name

https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/sample-apps/fixmycar/vertex-ai-search/dockerpush.sh

What happened?

Following the fixmycar sample-app here , while running the script ./dockerpush.sh the script ends with the following error:
An image does not exist locally with the tag: us-central1-docker.pkg.dev/PROJECT-ID/fixmycar/backend-vertex-ai-search

Relevant log output

(The PROJECT-ID in my code is OK, I've replaced it here for generic PROJECT-ID)

ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref e023d94f-882c-4f28-b70c-709c68f26350::dvrktl1idtinjgmwkje9cv3l1: "/.mvn": not found
The push refers to repository [us-central1-docker.pkg.dev/PROJECT-ID/fixmycar/backend-vertex-ai-search]

An image does not exist locally with the tag: us-central1-docker.pkg.dev/PROJECT-ID/fixmycar/backend-vertex-ai-search

Code of Conduct

  • I agree to follow this project's Code of Conduct
@askmeegs askmeegs changed the title [Bug]: [Bug]: FixMyCar docker push issue Apr 4, 2024
@askmeegs
Copy link
Contributor

askmeegs commented Apr 4, 2024

Hello! if you're seeing an error that An image does not exist locally, that usually means the docker build step failed, and there's no container image to push.

During the build, looks like you got an err: "/.mvn": not found. Did you install Maven 3.9+ during the prerequisites?

if Maven is correctly installed, you should be able to run this.

❯ mvn --version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/homebrew/Cellar/maven/3.9.6/libexec
Java version: 17.0.10, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk@17/17.0.10/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "14.4.1", arch: "aarch64", family: "mac"

The docker build step should then be able to run these maven commands during the build: https://github.com/GoogleCloudPlatform/generative-ai/blob/main/gemini/sample-apps/fixmycar/vertex-ai-search/backend/Dockerfile#L17

@davidjsanders
Copy link

For me, this is issue was caused by the omission of the wrapper from the git repository (probably due to the .gitignore) To fix this issue, I did the following...

  1. Changed directory to gemini/sample-apps/fixmycar/vertex-ai-search/backend
  2. Executed mvn wrapper:wrapper
  3. Change back to the the vertex-ai-search directory and the execute ./dockerpush.sh

After this, the docker push worked successfully. Hope this helps.

@DAVIDMCCREADY
Copy link

Getting this FixMyCar sample app to work is challenging.
Errors encountered so far are:

  1. Updating the GCP CloudShell Maven to version 3.9.6 or higher (thanks askmeegs).
  2. Fixing the missing wrapper (thanks davidjsaunders).
  3. Fixing the missing class file for com.google.protobuf.GeneratedMessageV3 (current impasse).

Any suggestions on the best way to fix the missing class file for com.google.protobuf.GeneratedMessageV3 ?

@askmeegs
Copy link
Contributor

askmeegs commented Jun 30, 2024

Hi all- Fixes in progress for 1, 2, and 3.
Issue 3 is a breaking upgrade in one of FixMyCar's backend dependencies, working on a temporary workaround.
protocolbuffers/protobuf#17247

@askmeegs askmeegs added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Jun 30, 2024
zeroasterisk pushed a commit to zeroasterisk/generative-ai that referenced this issue Jul 4, 2024
…xes protobuf dep. issue (GoogleCloudPlatform#829)

Fixes GoogleCloudPlatform#490  

### Changelog

- [x] Remove Cloud SQL flavor from upstream, keeping Vertex AI Search
(now agent builder). Rationale: all user feedback so far has been for
the Agent Builder flavor. GCP already has multiple Cloud SQL RAG sample
apps, including the [DB Retrieval
App](https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app)
and this [Jump Start
Solution](https://cloud.google.com/architecture/ai-ml/generative-ai-rag).
Removing the Cloud SQL flavor helps reduce duplicated code and
maintenance overhead in this repo. If we hear user feedback or requests
for the Cloud SQL flavor to return, I will re-add.
- [x] Swap in Agent Builder naming for all instances of Vertex AI
Search.
- [x] Upgrade model to Gemini 1.5 Flash. 
- [x] Java backend - commit `MavenWrapper`. This is [somewhat
contentious](https://stackoverflow.com/questions/47240546/should-the-mvnw-files-be-added-to-the-repository)
but will help speed up deployment for new users and make sure folks are
using the right Maven version.
- [x] Java backend - Fix [protobuf forward-breaking
change](protocolbuffers/protobuf#17247) by
switching all GCP client libs to the latest `libraries-bom`. Remove
specific versions of clients and dependencies. This seemed to resolve
the problem, which I believe was caused by multiple underlying and
incompatible protobuf versions.

---------
skewalramani-oss pushed a commit to skewalramani-oss/generative-ai that referenced this issue Aug 3, 2024
…xes protobuf dep. issue (GoogleCloudPlatform#829)

Fixes GoogleCloudPlatform#490  

### Changelog

- [x] Remove Cloud SQL flavor from upstream, keeping Vertex AI Search
(now agent builder). Rationale: all user feedback so far has been for
the Agent Builder flavor. GCP already has multiple Cloud SQL RAG sample
apps, including the [DB Retrieval
App](https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app)
and this [Jump Start
Solution](https://cloud.google.com/architecture/ai-ml/generative-ai-rag).
Removing the Cloud SQL flavor helps reduce duplicated code and
maintenance overhead in this repo. If we hear user feedback or requests
for the Cloud SQL flavor to return, I will re-add.
- [x] Swap in Agent Builder naming for all instances of Vertex AI
Search.
- [x] Upgrade model to Gemini 1.5 Flash. 
- [x] Java backend - commit `MavenWrapper`. This is [somewhat
contentious](https://stackoverflow.com/questions/47240546/should-the-mvnw-files-be-added-to-the-repository)
but will help speed up deployment for new users and make sure folks are
using the right Maven version.
- [x] Java backend - Fix [protobuf forward-breaking
change](protocolbuffers/protobuf#17247) by
switching all GCP client libs to the latest `libraries-bom`. Remove
specific versions of clients and dependencies. This seemed to resolve
the problem, which I believe was caused by multiple underlying and
incompatible protobuf versions.

---------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
4 participants