Skip to content

$(pwd) v $PWD #26

Open
Open
@codecowboy

Description

@codecowboy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions