add rust and mojo

This commit is contained in:
2024-01-28 22:50:45 +08:00
parent eb2f7652ba
commit fccde86721
2 changed files with 35 additions and 9 deletions

View File

@@ -146,4 +146,14 @@ docker push registry.cn-hangzhou.aliyuncs.com/hotwa/notebook:latest
# 拉取
docker pull registry.cn-hangzhou.aliyuncs.com/hotwa/jupyterhub:latest
docker pull registry.cn-hangzhou.aliyuncs.com/hotwa/notebook:latest
```
## add mojo
```shell
docker build --no-cache \
--build-arg AUTH_KEY= mut_efe460b898e3482bb6208bfcd4a51d7e \
-t mojosdk:latest \
-f mojo/examples/docker/Dockerfile.mojosdk .
docker buildx build --build-arg AUTH_KEY=mut_efe460b898e3482bb6208bfcd4a51d7e -t hotwa/notebook:latest . -f Dockerfile.base-notebook --load
```

View File

@@ -132,11 +132,33 @@ micromamba run -n plot python -m pip install bamboolib
micromamba run -n plot python -m ipykernel install --user --name="sciplot" --display-name="SCIPlot Environment"
EOT
# install mojo
ENV PATH="/home/${CREATE_USER}/.local/bin:$PATH"
# A random default token
ARG AUTH_KEY=5ca1ab1e
ENV AUTH_KEY=$AUTH_KEY
RUN curl https://get.modular.com | sh - && \
modular auth $AUTH_KEY
RUN
ARG MODULAR_HOME="/home/${CREATE_USER}/.modular"
ENV MODULAR_HOME=$MODULAR_HOME
ENV PATH="$PATH:$MODULAR_HOME/pkg/packages.modular.com_mojo/bin"
RUN <<EOT
#!/bin/bash
mamba create -n mixtral_env -c conda-forge ipykernel -y
mamba run -n mixtral_env python -m pip install
mamba run -n mixtral_env python -m ipykernel install --user --name="mixtral" --display-name="mixtral Environment"
curl https://get.modular.com | sh - && \
modular auth $AUTH_KEY
modular install mojo
EOT
RUN <<EOT
#!/bin/bash
micromamba create -n mixtral_env -c conda-forge ipykernel -y
git clone https://github.com/Lightning-AI/lit-gpt.git
cd lit-gpt
micromamba run -n mixtral_env python -m pip install -r requirements.txt
micromamba run -n mixtral_env python -m ipykernel install --user --name="mixtral" --display-name="mixtral Environment"
EOT
# Install Rust
@@ -147,10 +169,4 @@ cargo install evcxr_jupyter
evcxr_jupyter --install
EOT
# # new env
# RUN <<EOT
# #!/bin/bash
# EOT
WORKDIR "${HOME}"