Open-Assistant
Open-Assistant copied to clipboard
`docker-compose up` gives this error in project dir.
command I ran : docker-compose up
Error I got :
ERROR: The Compose file is invalid because:
Service backend has neither an image nor a build context specified. At least one must be provided.
When I asked chatGPT this question it gave me following answer.
It looks like the backend service in your docker-compose.yaml file does not have an image or build specified. You must specify either an image or a build in your service configuration in order to create the service.
You can specify an image like this:
services:
backend:
image: my-backend-image
Or you can specify a build like this:
services:
backend:
build:
context: .
dockerfile: Dockerfile.backend
In the example above, context specifies the build context, and dockerfile specifies the path to the Dockerfile.
Make sure to include either an image or a build in the backend service configuration in your docker-compose.yaml file.
'docker-compose' is the old way of doing that. Can you try 'docker compose up --build' please. Also what's the version of your docker?
@kostiak is correct. docker-compose might work but the really important part is --build since all the images have to be built locally.
I'm going to mark this I'm going to mark this as closed after verifying that the main README includes the --build flag.
Also what's the version of your docker?
sudo docker version
Client: Docker Engine - Community
Version: 20.10.8
API version: 1.41
Go version: go1.16.6
Git commit: 3967b7d
Built: Fri Jul 30 19:54:09 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.8
API version: 1.41 (minimum version 1.12)
Go version: go1.16.6
Git commit: 75249d8
Built: Fri Jul 30 19:52:16 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.9
GitCommit: e25210fe30a0a703442421b0f60afac609f950a3
runc:
Version: 1.0.1
GitCommit: v1.0.1-0-g4144b63
docker-init:
Version: 0.19.0
GitCommit: de40ad0
'docker compose up --build'
this command gives me this error.
unknown flag: --build
See 'docker --help'.
Usage: docker [OPTIONS] COMMAND
A self-sufficient runtime for containers
@hemangjoshi37a Looks similar to #284 Update docker and try again.
Re-opening. Something we could do regarding documentation is specify which version of Docker is required. Would anyone like to update the main README with that qualification?
Looks similar to #284 Update docker and try again.
@kostiak Thanks for the suggestion brother.
Would anyone like to update the main README with that qualification?
@fozziethebeat Once I get it solved, I will fix readme.md. Assign me for that bugfix.
Thank you for helping improve the documentation.
Would anyone like to update the main README with that qualification?
@fozziethebeat Please review pull request : #453
Maybe we can make a FAQ.md or something like that and build up some common stuff over time. I'll try pull something together.
Or adding a GitHub discussion for each question (with FAQ tag) could be useful perhaps if we decide to turn on GitHub discussions
https://github.com/LAION-AI/Open-Assistant/issues/334

Hi, I was also having the same problem, I ran docker with sudo docker-compose up --build and it worked
@sir-braz do not run docker-compose - that's the old way of running it.
Please try to run the following:
docker compose up --build
also, make sure to run it from the project's root directory. In your case ~/Documentos/Open-Assistant/.
This solved my issue. Closing.
DOCKER_CONFIG=${DOCKER_CONFIG:/usr/local/lib/docker}
mkdir -p $DOCKER_CONFIG/cli-plugins
curl -SL https://github.com/docker/compose/releases/download/v2.15.0/docker-compose-linux-x86_64 -o $DOCKER_CONFIG/cli-plugins/docker-compose
chmod +x $DOCKER_CONFIG/docker-compose
sudo chmod +x $DOCKER_CONFIG/docker-compose
sudo cp $DOCKER_CONFIG/docker-compose $DOCKER_CONFIG compose
chmod +x $DOCKER_CONFIG/compose
sudo chmod +x $DOCKER_CONFIG/compose
sudo docker compose version