-
Notifications
You must be signed in to change notification settings - Fork 509
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
git submodule init: not a git repository #2172
Comments
I can't reproduce this. Note that in order for builds from Git to work, you need to have git installed so that |
I've checked and I do have git installed, I'll share the entire Ollama fails to compile not because it doesn't have git installed, but rather because it cannot find the Changing the version: '3'
services:
ollama:
container_name: ollama
entrypoint: /go/src/github.com/jmorganca/ollama/ollama
command: serve
environment:
- OLLAMA_HOST=0.0.0.0:11434
- OLLAMA_ORIGINS=*
- HSA_OVERRIDE_GFX_VERSION=10.3.0 # Only required for some Radeon GPUs
build:
context: https://github.com/jmorganca/ollama.git#main
dockerfile: Dockerfile.build
args:
GOFLAGS: "'-ldflags=-w -s -X=github.com/jmorganca/ollama/server.mode=release'"
ports:
- 11434:11434/tcp
devices: # Give access to AMD GPU
- /dev/kfd
- /dev/dri
volumes:
- ./ollama_data:/root/.ollama
restart: unless-stopped
ollama-webui:
container_name: ollama-webui
build:
context: https://github.com/ollama-webui/ollama-webui.git#main
args:
OLLAMA_API_BASE_URL: '/ollama/api'
depends_on:
- ollama
ports:
- 3000:8080/tcp
environment:
- OLLAMA_SKIP_PATCHING=true
- OLLAMA_API_BASE_URL=http://ollama:11434/api
volumes:
- ./ollama_webui:/app/backend/data
restart: unless-stopped
|
Ah, this error does not come from BuildKit doing the Git checkout (eg. https://github.com/moby/buildkit/blob/master/source/git/source.go#L626 ) but your own container process calling |
That worked, thank you! I was expecting the default to keep the I'll share the working docker-compose file that worked, in case someone has the same problem in the future. version: '3'
services:
ollama:
entrypoint: /go/src/github.com/jmorganca/ollama/ollama
command: serve
build:
context: https://github.com/jmorganca/ollama.git#main
dockerfile: Dockerfile.build
args:
GOFLAGS: "'-ldflags=-w -s -X=github.com/jmorganca/ollama/server.mode=release'"
BUILDKIT_CONTEXT_KEEP_GIT_DIR: true # Added this
restart: unless-stopped |
Contributing guidelines
I've found a bug and checked that ...
Description
I'm trying to build Ollama directly from the URL but it fails to clone the
Expected behaviour
I'd expect it to build the image successfully
Actual behaviour
It fails with
not a git repository
Buildx version
github.com/docker/buildx 0.12.0 542e5d8
Docker info
Builders list
Configuration
I guess you could try the command directly or using the compose file
Build logs
No response
Additional info
Cloning the repository (without its submodules) works without issue:
git clone https://github.com/jmorganca/ollama.git --depth 1 docker buildx build \ ./ollama \ -f ./ollama/Dockerfile.build \ --build-arg=GOFLAGS="'-ldflags=-w -s -X=github.com/jmorganca/ollama/server.mode=release'"
The text was updated successfully, but these errors were encountered: