Install Mojo/Magic
Is it Magic using or installing CONDA at any time to install Mojo?
12 Replies
Good day. You can install mojo+MAX using either
The point behind
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
,
Get started with Magic | Modular Docs
Magic is a package manager and virtual environment manager for any language,
Congrats @Darin Simmons, you just advanced to level 19!
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
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.
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
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
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. ]]]
What operating system are you using? What command did you use to refresh your profile aka "source command" aka "source the terminal"
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"]
Created a brand new Ubuntu server
same thing on the next try
I also tried the location the message mentioned the "binary is in", that didn't work either.
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.