Skip to content

[Bug]: The PATH is overridden when logging via SSH #930

@peterschmidt85

Description

@peterschmidt85

The steps to reproduce:

  1. Define .dstack.yml
type: dev-environment

python: "3.11"

ide: vscode
  1. dstack run .

  2. ssh <run name>

  3. python --version

Results in bash: python: command not found

A possible reason:

cat ~/.profile
# ~/.profile: executed by Bourne-compatible login shells.

if [ "$BASH" ]; then
  if [ -f ~/.bashrc ]; then
    . ~/.bashrc
  fi
fi

mesg n 2> /dev/null || true
export PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

The last command overrides the PATH set in ~/.bashrc.

As a workaround, for now, invoke conda activate workflow manually after logging in.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions