py 3.13 and path issues

#2
by arthrod - opened
Files changed (1) hide show
  1. Dockerfile +22 -11
Dockerfile CHANGED
@@ -2,29 +2,40 @@ FROM debian:latest AS puppy
2
 
3
  # prep
4
  RUN apt-get update \
5
- && apt-get install -y curl \
6
  && apt-get clean
7
 
8
  RUN useradd -m -u 1000 user
9
  USER user
10
  ENV HOME=/home/user \
11
- PATH=/home/user/.pixi/bin:$PATH \
12
  PUP=/home/user/.pixi/bin/pup
13
  RUN mkdir $HOME/puppy
14
  WORKDIR $HOME/puppy
15
 
16
  # install puppy
17
- RUN curl -fsSL https://raw.githubusercontent.com/liquidcarbon/puppy/main/pup.sh | bash -s 3.12
18
- RUN echo '#!/bin/bash\n/home/user/puppy/pup.py "$@"' > $PUP && chmod +x $PUP
19
- RUN pup
20
- RUN pixi run uv init mo
21
- RUN pup fetch mo marimo pandas
22
- RUN pup list mo
23
- RUN cp -r mo/.venv/lib/python3.12/site-packages/marimo/_tutorials . && mv _tutorials marimo_tutorials
 
 
 
24
 
25
- EXPOSE 7860
 
 
 
 
 
 
 
26
 
27
- CMD ["pixi", "run", "mo/.venv/bin/marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"]
 
28
 
29
  # deploy without installing
30
  # CMD ["pixi", "run", "uvx", "marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"]
 
2
 
3
  # prep
4
  RUN apt-get update \
5
+ && apt-get install -y curl wget \
6
  && apt-get clean
7
 
8
  RUN useradd -m -u 1000 user
9
  USER user
10
  ENV HOME=/home/user \
11
+ PATH=/home/user/.pixi/bin:$PATH \
12
  PUP=/home/user/.pixi/bin/pup
13
  RUN mkdir $HOME/puppy
14
  WORKDIR $HOME/puppy
15
 
16
  # install puppy
17
+ RUN curl -fsSL https://pixi.sh/install.sh | bash
18
+ RUN echo 'export PATH=$HOME/.pixi/bin:$PATH' >> $HOME/.bashrc
19
+ RUN . $HOME/.bashrc && \
20
+ curl -fsSL https://raw.githubusercontent.com/liquidcarbon/puppy/main/pup.sh | bash -s 3.13
21
+ RUN echo '#!/bin/bash' > $PUP && \
22
+ echo 'pixi run python /home/user/puppy/pup.py "$@"' >> $PUP && \
23
+ chmod +x $PUP
24
+ RUN . $HOME/.bashrc && pixi run uv init mo
25
+ RUN . $HOME/.bashrc && pixi run uv pip install -U marimo pandas
26
+ RUN echo 'export PATH=/home/user/puppy/.pixi/envs/default/bin:$PATH' >> $HOME/.bashrc
27
 
28
+ RUN . $HOME/.bashrc && \
29
+ $HOME/puppy/.pixi/envs/default/bin/python -c "import sys, marimo; print(f'Python path: {sys.executable}'); print(f'Marimo version: {marimo.__version__}')"
30
+
31
+ RUN . $HOME/.bashrc && \
32
+ $HOME/puppy/.pixi/envs/default/bin/python -c "import site, os, marimo; print(os.path.join(site.getsitepackages()[0], 'marimo', '_tutorials'))" > tutorials_path && \
33
+ cp -r $(cat tutorials_path) . && \
34
+ mv _tutorials marimo_tutorials && \
35
+ rm tutorials_path
36
 
37
+ EXPOSE 7860
38
+ CMD ["pixi", "run", "marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"]
39
 
40
  # deploy without installing
41
  # CMD ["pixi", "run", "uvx", "marimo", "tutorial", "intro", "--host", "0.0.0.0", "--port", "7860", "--no-token"]