Spaces:
Runtime error
Runtime error
py 3.13 and path issues
#2
by
arthrod
- opened
- 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 |
-
|
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://
|
18 |
-
RUN echo '
|
19 |
-
RUN
|
20 |
-
|
21 |
-
RUN
|
22 |
-
|
23 |
-
|
|
|
|
|
|
|
24 |
|
25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
-
|
|
|
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"]
|