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

Invalid mount path: ''/home/user'/testcase.py' mount path must be absolute #630

Open
JanMarcoRuizdeVargas opened this issue Feb 29, 2024 · 6 comments

Comments

@JanMarcoRuizdeVargas
Copy link

Hi,
when trying to run

TESTCASE=bestest_air docker-compose up
(Ubuntu debian 20.04)

I get the following error:

Recreating project1-boptest_boptest_1 ... error

ERROR: for project1-boptest_boptest_1 Cannot create container for service boptest: invalid volume specification: '/home/janmarco.ruiz/code_development/boptest_playground/project1-boptest-gym/project1-boptest/testcase.py:'/home/user'/testcase.py:rw': invalid mount config for type "bind": invalid mount path: ''/home/user'/testcase.py' mount path must be absolute

ERROR: for boptest Cannot create container for service boptest: invalid volume specification: '/home/janmarco.ruiz/code_development/boptest_playground/project1-boptest-gym/project1-boptest/testcase.py:'/home/user'/testcase.py:rw': invalid mount config for type "bind": invalid mount path: ''/home/user'/testcase.py' mount path must be absolute
ERROR: Encountered errors while bringing up the project.

I tried fiddling around a lot with the APP_USER and TESTCASE variables in the environment.yml, but nothing worked. For some reason, it seems that these variables are set with exta single quotation marks, i.e. APP_USER = '/home/user', which causes the issue. But i can't figure out how to fix this.

Does anyone have any ideas? I would really appreciate your help, thanks!

@dhblum
Copy link
Collaborator

dhblum commented Feb 29, 2024

Sorry for this issue, I have not seen it before. A couple things:

  1. I'm not quite clear, if you set APP_USER=/home/user without the single quotes, does it work?
  2. Another issue might be related to using docker-compose vs. docker compose on Ubuntu 20.04 and how the .env gets interpreted (this is just a guess). I think the travis configuration is Ubuntu 16 actually by default and uses docker-compose. I realize when I run on Ubuntu 18 I use docker-compose but on Ubuntu 20 I use docker compose. Can you try using docker compose on your Ubuntu 20, and also report what version of docker-compose you are using when you get that error? We might need to update our guidance on usage of docker-compose vs docker compose.

@JanMarcoRuizdeVargas
Copy link
Author

Many thanks for your quick reply!
Using docker compose instead of docker-compose actually fixed it!

I am using docker-compose version 1.25.0 build unkown where I get the error described above. Hope that helps.

Regarding 1.: even though it doesn't matter now, where could I have set the APP_USER? i didn't find APP_USER=/home/user anywhere, in the Dockerfile I only found
ENV HOME /home/user

@dhblum
Copy link
Collaborator

dhblum commented Feb 29, 2024

Ok good to know using docker compose fixed it. Our travis.yml file indicates we use docker-compose version 1.26.0 for testing. So it seems updating docker-compose to at least that version may also fix the issue.

APP_USER is set in the .env file in the root of the repo.

I'm going to keep this issue open so that we can try to clarify documentation around this.

@JanMarcoRuizdeVargas
Copy link
Author

I'm not exactly sure why, but it seems the newest docker-compose version I can install on my system is 1.25.0. So unfortunately I couldn't check whether 1.26+ fixes the error.

I did check changing APP_PATH=/home/user instead of APP_PATH='/home/user' in the .env file, that also fixed the error.

I hope that helps in clarifying the documentation, let me know if you need anything else. :)

@dhblum
Copy link
Collaborator

dhblum commented Mar 4, 2024

All good to know, thank you @JanMarcoRuizdeVargas!

@JanMarcoRuizdeVargas
Copy link
Author

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants