Reputation: 21
I'm working through a tutorial for XGBoost (see: https://github.com/ParrotPrediction/docker-course-xgboost), but am getting an error when running
$ docker-compose up
That I am fairly sure is caused by an outdated docker-compose version (-v tells me 1.3.1) resulting in an incompatibility with the new version 2 filetype.
However, when running sudo-apt get update, it tells me this is the most recent version (and have tried installing both via pip and the curl instructions on this page curl -L https://github.com/docker/compose/releases/download/1.8.0/run.sh > /usr/local/bin/docker-compose). pip runs fine, but leaves me with the current version seemingly and after getting permission denied running sudo curl ... I was able to get those instructions to run using sudo sh -c curl ...
I was however, able to update docker-compose to v1.8.0 as the root user using su -i, but those changes aren't carried over to my user account.
Upvotes: 1
Views: 1522
Reputation: 83
I belive you have two issues to address.
In docker-compose.yml file in XGBoost the format version is clearly defined as version 2. Based on the Docker Version Reference you require 1.10.0 and above to adhere to docker-compose file format version 2.
You can install the appropriate version using following commands
curl -L https://github.com/docker/compose/releases/download/<version>/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
Replace <version> with the release version you require to install
There are many issues reported about version mismatch from root user and non root user when the docker-compose version
is executed. To resolve issues related, you have a clean setup of docker-compose with following steps in debian based system.
#remove any previously installled docker-compose
sudo apt-get purge docker-compose
# Install the version by replacing <version> with appropriate you desire
sudo curl -L https://github.com/docker/compose/releases/download/<version>/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
#create a soft link
sudo ln -sf /usr/local/bin/docker-compose /usr/bin/docker-compose
This should solve your problem..
Upvotes: 2