Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: VCUE-701 updated for current Clariden environment

...

Code Block
languagebash
titleCreate remote folders
[clariden][myuser@clariden-ln001 ~]$ mkdir -p ~/.vscode-server
[clariden][myuser@clariden-ln001 ~]$ touch ~/.wget-hsts


B-2. Configure an EDF file for your container environment

...

  • mounts:
    • /iopsstor/scratch/cscs/myuser : to preserve scratch output
    • /users/myuser/.vscode-server : to preserve VSCode binaries/users/myuser/.wget-hsts : to preserve VSCode download history
    • /users/myuser/.bash_history : to preserve bash history
  • writable: It is required to be able to use the hook.

...

Code Block
languagebash
titleEDF example
[clariden][myuser@clariden-ln001 ~]$ cat ~/.edf/vscode-pytorch.toml
image = "nvcr.io#nvidia/pytorch:24.01-py3"
writable = true
mounts = ["/iopsstor/scratch/cscs/myuser:/iopsstor/scratch/cscs/myuser",
	  "/users/myuser/.vscode-server:/users/myuser/.vscode-server",
	  "/users/myuser/.wget-hsts:/users/myuser/.wget-hsts",
	  "/users/myuser/.bash_history:/users/myuser/.bash_history"]
workdir = "/iopsstor/scratch/cscs/myuser"

[annotations.com.hooks.ssh]
enabled = "true"
authorize_ssh_key = "/users/myuser/.ssh/cscs-key.pub"

...

Code Block
languagebash
titleSubmit container job
[clariden][myuser@clariden-ln001 ~]$ srun -pA nvgpumyaccount --environment=vscode-pytorch --pty bash
srun: job 73993 queued and waiting for resources
srun: job 73993 has been allocated resources
pyxis: importing docker image: nvcr.io#nvidia/pytorch:24.01-py3
pyxis: imported docker image: nvcr.io#nvidia/pytorch:24.01-py3 at /run/pyxis/XXXXX/73993.0.squashfs
myuser@nid00XXXX:/iopsstor/scratch/cscs/myuser$


B-4. (Temporary workaround) Update permissions of authorized_keys file

Code Block
languagebashshell
titleUpdate authorized_keys permissions inside the container
myuser@nid00XXXX:/iopsstor/scratch/cscs/myuser$ chmod g-w ~/.ssh/authorized_keys

...

...