Install Mojo/Magic

Is it Magic using or installing CONDA at any time to install Mojo?
15 Replies
Darin Simmons
Darin Simmons2mo ago
Good day. You can install mojo+MAX using either magic or conda.
The point behind magic is to both attend to environments as well as package management as well as it's specifically designed to use mojo , max, as well as other languages. Here's the instuctions for magic To use conda to install mojo+MAX,
cd my-conda-project
conda activate my-conda-project
conda config --env --add channels https://conda.modular.com/max conda-forge
conda install max
cd my-conda-project
conda activate my-conda-project
conda config --env --add channels https://conda.modular.com/max conda-forge
conda install max
Get started with Magic | Modular Docs
Magic is a package manager and virtual environment manager for any language,
ModularBot
ModularBot2mo ago
Congrats @Darin Simmons, you just advanced to level 19!
f.geraci
f.geraciOP2mo ago
Thank you very much for the reply. The issue that we are having that due to the new conda licensing the company has decided to "ban" all conda. Now I have been asked to "evaluate" mojo+max but if at any point magic uses conda or conda channels to install necessary libraries, I would have to stop I hope my explanation make sense
dohzya
dohzya2mo ago
So the question is “does magic needs/uses conda?” (or “is it possible to use magic without having conda installed, neither manually or by magic?”), is that right? I don’t have the answer, but I noted that some error messages (when trying to install invalid packages) contain the word conda. However I suppose it is only used as a standard for packages repositories, nor as a lib.
Darin Simmons
Darin Simmons2mo ago
Two things. One, I hope that smarter heads prevail. conda is no longer owned by Anaconda, has a BSD-license, and banning it would in practicality, force everything to PyPi. My personal opinion: Gimping the entire toolchain because someone wasn't willing to read the docs is more about stupidity and ignorance than risk-aversion. Two, magic is based on pixi and adapted for mojo+MAX use. (magic is currently version 0.4.0 based on pixi version 0.33.0). While conda channels can be skipped, pixi uses conda to manage the environments. magic cannot - as far as my imagination could come up with - be used without the project environment created by conda. Hope that clarifies.
prefix.dev
prefix.dev – solving software package management
The software package management platform for Python, C++, R, Rust and more
f.geraci
f.geraciOP2mo ago
Even I have never used conda to handle my envs, I am not the person that takes those decisions, I am the person that tries to get things to work for many users. I would like to thank you for replying, as a personal project I will try it out
ClearFuzz
ClearFuzz2mo ago
MAX install -- second step ---- "then run the source command that's printed in your terminal" when I try to run that exact command, quadruple checked to make sure I got it right it says the path is not found / folder is not found I poked around for quite a while, and chatted with ChatGPT for quite a bit trying everything ChatGPT suggested for probably an hour, at least a dozen different hacks at it. No go. So I'm only about a third of the way into the MAX install, since it can't do the rest of it without knowing where the path to MAGIC is. I repeated that MAGIC install three more times, too, after I tried everything else, so screwing up the first step is not the issue, either. And I see people saying Conda and MAGIC can step on each other. Are my folder paths user specific instead of organization specific? (thought) Or I'm not logged into somewhere I need to log into? THOUGHTS? MAX and Mojo are kinda useless unless I can get past the very first step. Thanks in advance !!!! For my pride, hopefully I'm not missing something amazingly simple. [[[ EDIT - the MAGIC Mojo install is frozen at the first step also. ]]]
Darin Simmons
Darin Simmons2mo ago
What operating system are you using? What command did you use to refresh your profile aka "source command" aka "source the terminal"
ClearFuzz
ClearFuzz2mo ago
Where MAX/mojo are installed is a Ubuntu 22.04 within Docker - and Docker is running on a Windows 10 laptop. The first step is curl -ssL https://magic.modular.com/c5d551.......... then the next sub-step "Then run the source command printed in your terminal." EFFECTIVELY THE SAME step for MAX and Mojo says it can't find the "MAGIC" path it needs from the step before. Ubuntu server was created via a dockerfile loading Ubuntu 22.04, Python 3.12, PyTorch, and LangChain, no errors in the server build. And MAX / Mojo was installed "clean" on top of that freshly minted Ubuntu. ++++++++++++++ ++++++++++++++ Here's the text of the dockerfile that built the Ubuntu server: Use the official Ubuntu 24.04 LTS as the base image FROM ubuntu:22.04 Set environment variables to prevent interactive prompts during package installations ENV DEBIAN_FRONTEND=noninteractive Update package list and install necessary dependencies RUN apt-get update && \ apt-get install -y \ software-properties-common \ wget \ curl \ git \ build-essential \ libssl-dev \ zlib1g-dev \ libbz2-dev \ libreadline-dev \ libsqlite3-dev \ libffi-dev \ libncurses5-dev \ libncursesw5-dev \ xz-utils \ tk-dev \ liblzma-dev \ lzma \ lzma-dev \ ca-certificates && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* Install Python 3.12 RUN apt-get update && \ apt-get install -y software-properties-common && \ add-apt-repository ppa:deadsnakes/ppa && \ apt-get update && \ apt-get install -y \ python3.12 \ python3.12-distutils \ python3.12-venv \ python3.12-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* Upgrade pip for Python 3.12 RUN python3.12 -m ensurepip && \ python3.12 -m pip install --upgrade pip Install PyTorch compatible with Python 3.12 RUN python3.12 -m pip install torch --index-url https://download.pytorch.org/whl/cpu Install LangChain RUN python3.12 -m pip install langchain Install Hugging Face Transformers RUN python3.12 -m pip install transformers Set the working directory in the container WORKDIR /app Make port 80 available to the world outside this container EXPOSE 80 Set the default command to keep the container running CMD ["tail", "-f", "/dev/null"]
ClearFuzz
ClearFuzz2mo ago
Created a brand new Ubuntu server same thing on the next try
No description
ClearFuzz
ClearFuzz2mo ago
I also tried the location the message mentioned the "binary is in", that didn't work either.
Darin Simmons
Darin Simmons2mo ago
It appears - which is to say that I am not 100% sure - that the issue is with Docker /bin/sh. not using source like bash would. https://docs.docker.com/reference/dockerfile/#shell-form
Docker Documentation
Dockerfile reference
Find all the available commands you can use in a Dockerfile and learn how to use them, including COPY, ARG, ENTRYPOINT, and more.
ClearFuzz
ClearFuzz2mo ago
Disclaimer: I'm a developer newbie as such, I'm definitely trying to hack away at this for a while in between asking each question, for my own learning, and to minimize wasting anybody else's time helping the new guy AND I've been able to make a bit of progress by hacking away at it again and again with the help of ChatGPT and I've been able to make it several steps further into both the "Getting Started with MAX" and "Getting Started with Mojo" steps -- it appears I can MANUALLY update the path Pretty consistently it seems like the docker terminal isn't aware of the paths that the given steps think it should be, for both MAX and Mojo but my fixes seem to be temporary, and "don't stick" after I've taken a few more steps and at multiple layers and steps of that, it's a very consistent issue I think --- Darin --- that you're pointing in the same direction, maybe what you put above completely and accurately describes what's going on? because I'm a newbie, I can only follow explicit directions explicitly, and I don't know "context" to "read between the lines", or I don't know to recognize or know what to do to fill in what's missing where "the directions forgot a step". I know both MAX and Mojo are installed SOMEWHERE but I'm not sure if it's the RIGHT somewhere ---- Should I reach out to some Mojo person on Upwork or Fiverr and pay to have them help me learn what there is to learn? Or could somebody help me via Zoom and do a little walkthrough of what I've got?
ModularBot
ModularBot2mo ago
Congrats @ClearFuzz, you just advanced to level 1!
Darin Simmons
Darin Simmons2mo ago
I do my best to avoid all things Docker so I'm not a good resource for this. I suggest starting your own #questions regarding Docker install.
Want results from more Discord servers?
Add your server