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

$(pwd) v $PWD #26

Open
codecowboy opened this issue Nov 30, 2024 · 0 comments
Open

$(pwd) v $PWD #26

codecowboy opened this issue Nov 30, 2024 · 0 comments

Comments

@codecowboy
Copy link

In the bind mount section, I had to use "$PWD" instead of "$(pwd)" but am unclear as to why.

I'm adapting the instructions to a current use case I have:

docker run -it --runtime=nvidia --gpus all --mount type=bind,source="$PWD"/upscale,target=/home name-of-container bash

The above works for me but if I use "$(pwd)" I get the error:

docker: Error response from daemon: invalid mount config for type "bind": bind source path does not exist: /upscale.
See 'docker run --help'.

Might this be the nvidia runtime causing this? I am using the nvidia container toolkit for the equivalent to passthrough in VM land.

The image is ubuntu:jammy

I wondered if you might be able to shed some light on this? I realise it's not strictly related to the course content.

edit - I since realised that this works:

docker run -it --runtime=nvidia --gpus all --mount type=bind,source="$(pwd)/upscale",target=/home name-of-container bash

So maybe there is a typo in your instructions (note that the closing quote goes after the complete path) or I have been staring at this for too long

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

1 participant