Spaces:
Sleeping
Sleeping
FROM debian:latest AS puppy | |
# prep | |
RUN apt-get update \ | |
&& apt-get install -y curl wget \ | |
&& apt-get clean | |
RUN useradd -m -u 1000 user | |
USER user | |
ENV HOME=/home/user \ | |
PATH=/home/user/.pixi/bin:$PATH \ | |
PUP=/home/user/.pixi/bin/pup | |
RUN mkdir $HOME/puppy | |
WORKDIR $HOME/puppy | |
# install puppy | |
RUN curl -fsSL https://pixi.sh/install.sh | bash | |
RUN echo 'export PATH=$HOME/.pixi/bin:$PATH' >> $HOME/.bashrc | |
RUN . $HOME/.bashrc && \ | |
curl -fsSL https://raw.githubusercontent.com/liquidcarbon/puppy/main/pup.sh | bash -s 3.13 | |
RUN echo '#!/bin/bash' > $PUP && \ | |
echo 'pixi run python /home/user/puppy/pup.py "$@"' >> $PUP && \ | |
chmod +x $PUP | |
RUN . $HOME/.bashrc && pixi run uv init mo | |
RUN . $HOME/.bashrc && pixi run uv pip install -U marimo pandas | |
RUN echo 'export PATH=/home/user/puppy/.pixi/envs/default/bin:$PATH' >> $HOME/.bashrc | |
RUN . $HOME/.bashrc && \ | |
$HOME/puppy/.pixi/envs/default/bin/python -c "import sys, marimo; print(f'Python path: {sys.executable}'); print(f'Marimo version: {marimo.__version__}')" | |
RUN . $HOME/.bashrc && \ | |
$HOME/puppy/.pixi/envs/default/bin/python -c "import site, os, marimo; print(os.path.join(site.getsitepackages()[0], 'marimo', '_tutorials'))" > tutorials_path && \ | |
cp -r $(cat tutorials_path) . && \ | |
mv _tutorials marimo_tutorials && \ | |
rm tutorials_path | |
EXPOSE 7860 | |
CMD ["pixi", "run", "marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"] | |
# deploy without installing | |
# CMD ["pixi", "run", "uvx", "marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"] |