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

MD Express error when starting from within a docker #92

Open
AHarouni opened this issue Oct 26, 2022 · 5 comments
Open

MD Express error when starting from within a docker #92

AHarouni opened this issue Oct 26, 2022 · 5 comments

Comments

@AHarouni
Copy link

I can start and run MD Express from a local host. However I get an error from docker compose not finding files when I try to run MD express through a docker in docker after exposing the socket
-v /var/run/docker.sock:/var/run/docker.sock

it seems like MD express launches dockers of its own as I get error trying to look for config files that are there on host but are mounted in different directory in the docker

Work around:
I map the host dir to exactly the same as is into the docker as
-v /home/harouni/demos/MDExpress:/home/harouni/demos/MDExpress

Proposed solution
we can add a variable in the .env file as HOST_PATH which would be defaulted to $PWD but I can then change to read from an environment variable as
-e HOST_PATH=/home/harouni/demos/MDExpress
That way you can launch the sub dockers using this variable HOST_PATH

@JHancox
Copy link
Contributor

JHancox commented Oct 31, 2022

@AHarouni - out of curiosity are you using the dind container or something else?

@AHarouni
Copy link
Author

@JHancox I am not using dind container. instead this is any container with jupyterlab as nvidia pytorch base. I then expose the docker socket and apt install docker cli
That way I can run docker commands from the jupyter notebook.
This issue is these docker commands fails if they relay on PWD since the directory is virtual in the jupyter notebook container, while the docker engine search for this path on the host and doesn't find it

@JHancox
Copy link
Contributor

JHancox commented Nov 4, 2022

This actually seems to stem from a lingering Docker/Compose bug: github.com/docker/for-linux/issues/675. I tried a couple of internal workarounds but no luck. Once the underlying issue is fixed, it should actually work fine in MDE.

JHancox added a commit that referenced this issue Nov 7, 2022
Described the problem and the workaround for it. The underlying problem seems to be Docker-related rather than a problem in MDE.
@AHarouni
Copy link
Author

AHarouni commented Nov 9, 2022

The link doesn't work anymore.

@JHancox
Copy link
Contributor

JHancox commented Nov 10, 2022

The link doesn't work anymore.

For some reason, I can't get the link to both display correctly and work, but it seems to, at least, work for now. I also updated the readme to make people aware of this problem and suggest your workaround.

dbericat added a commit that referenced this issue Aug 29, 2023
Updated Known Issues section to include #92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants