Files
Nicolò Boschi 89f4d2e34d docs: stop recommending --user for Docker bind mounts (#3863) (#3934)
The bind-mount note told users to run the image as their host user with
`--user $(id -u):$(id -g) -e HOME=/home/hindsight` when the host directory
was not owned by UID 1000. That command crashes the container for every
host UID that is not 1000.

The image only creates the `hindsight` user (UID 1000), so any other UID
has no /etc/passwd entry. torch calls `getpass.getuser()` unconditionally
while resolving its inductor cache directory, which falls through to
`pwd.getpwuid(os.getuid())` and raises:

    KeyError: 'getpwuid(): uid not found: 1042'

The reporter's directory was mode 0777 and owned by their UID, so the
pg0 writability pre-check passed and the failure surfaced later as an
opaque torch traceback rather than a permission error.

Replace the advice with the one supported option — chown the host
directory to 1000:1000 and run as the default user — and say explicitly
that --user with another UID is not supported, so the next person
recognises the getpwuid error. Point at a named volume for hosts where
chowning is not possible.

The same advice was printed by the pg0 writability failure message in
start-all.sh, so correct it there too.

Claude-Session: https://claude.ai/code/session_011KDT484YujNcBxHzbfzNbk
2026-08-31 15:48:28 +02:00
..