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

[Magic CLI]: Modular Stack @ the command line and VS Code functionality. #3909

Open
rcghpge opened this issue Dec 23, 2024 · 1 comment
Open
Labels
magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label

Comments

@rcghpge
Copy link

rcghpge commented Dec 23, 2024

Issue description

Hi Modular team and community,

I’m encountering an issue while installing the Modular stack. Specifically, when using magic-cli in a Bash shell, I’m running into errors in the following scenarios:

  • Initializing a shell with magic shell
  • Adding max, which triggers the same error.

Additionally, I’m experiencing functionality issues when attempting to integrate the stack with VS Code. My initial thought is that these problems might stem from a deprecated library or symbolic link issue, causing bugs with the Mojo compiler.

Steps to reproduce

  • Run magic shell in a Bash shell.
  • Observe the error message (details and screenshots attached).
  • Attempt to add max (triggers the same error).
  • Attempt to integrate the stack in VS Code and observe related functionality issues.

other magic-cli commands: magic shell, magic add max, magic add ncurses

Troubleshooting Attempts:

  • Ran magic clean, magic self-update, and magic update to reset the environment.
  • Verified my environment setup.
  • Re-attempted installation and integration after cleaning, but the issues persist.
rcupc@galactus-prime:/mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo$ ls
LICENSE    imgs        mojoproject.toml           prepro_tinystories.py  test.md         train_gpt2.mojo  usage_instructions.md
README.md  magic.lock  prepro_tinyshakespeare.py  requirements.txt       test_gpt2.mojo  train_gpt2.py
rcupc@galactus-prime:/mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo$ magic shell
  ⠠ validate cache       [00:00:36] [━━━━━━━━━━━━━━━━━━━━] max-core
  ⠴ download & extract   [00:00:36] [━━━━━━━━━━━━━━━━━━━━] 7.07 MiB @ 12.09 KiB/s
  ⠠ installing packages  [00:00:36] [━━━━━━━━━━━━━╾──────]   142/217 max-python (+73)
  × failed to link ncurses-6.5-he02047a_1.conda
  ├─▶ failed to link 'share/terminfo/n/ncr260vt300wpp'
  ├─▶ failed to copy file to destination
  ╰─▶ Symbolic link loop (os error 40)

rcupc@galactus-prime:/mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo$ sudo chmod -R u+rw /mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo
[sudo] password for rcupc: 
rcupc@galactus-prime:/mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo$ magic add ncurses
  ⠈ validate cache       [00:00:26] [━━━━━━━━━━━━━━━━━━━╾] max-core (+1)
  ⠈ installing packages  [00:00:26] [━━━━━━━━━━━━────────]    44/75 python (+28)
  × failed to link ncurses-6.5-he02047a_1.conda
  ├─▶ failed to link 'share/terminfo/n/ncr260vt300wpp'
  ├─▶ failed to copy file to destination
  ╰─▶ Symbolic link loop (os error 40)

rcupc@galactus-prime:/mnt/c/Users/PC/Desktop/Projects/modular/stdlib/llm.mojo$ 

Screenshot (88)

Version Info

- Provide magic CLI version by pasting the output of `magic --version`
  `magic 0.5.1 - (based on pixi 0.37.0)`

- What OS did you install the magic CLI on?
  Ubuntu 24.04.1 - Linux; running bash in VS Code terminal.

- If you're on Linux include the flavor and version e.g. Ubuntu 22.04.
  Ubuntu 24.04.1 LTS - bash shell

- Include your CPU architecture e.g. x86-64 or arm64.
  x86-64 Intel Xeon v5 CPU, Intel GPU, NVIDIA GPU 

- If related to unresolvable dependencies, include the contents of your
  `magic.lock` file.
  **See attachment:** [magic.lock.txt](https://github.com/user-attachments/files/18229828/magic.lock.txt)

Thanks, Modular, happy holidays and happy new years to the Modular community!
@rcghpge rcghpge added magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label labels Dec 23, 2024
@alexturcea
Copy link

alexturcea commented Dec 24, 2024

I have the same problem inside a devcontainer - it only works if I create the magic env outside the mounted dir (i.e. the dir that appears in the solution explorer).

What also confuses me is that the mojo extension is installing its own MAX SDK which is used when running a mojo file inside vs code, and I cannot find a way to use the magic env instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
magic-cli Anything related to the Magic CLI mojo-repo Tag all issues with this label
Projects
None yet
Development

No branches or pull requests

2 participants