Spaces:
Sleeping
py 3.13 and path issues
Browse files--> RUN useradd -m -u 1000 user
DONE 0.0s
--> RUN mkdir /home/user/puppy
DONE 0.0s
--> WORKDIR /home/user/puppy
DONE 0.0s
--> RUN curl -fsSL https://raw.githubusercontent.com/liquidcarbon/puppy/main/pup.sh | bash -s 3.12
main: line 35: pixi: command not found
This script will automatically download and install Pixi (latest) for you.
Getting it from this url: https://github.com/prefix-dev/pixi/releases/latest/download/pixi-x86_64-unknown-linux-musl.tar.gz
#=#=#
######################################################################## 100.0%
The 'pixi' binary is installed into '/home/user/.pixi/bin'
Could not update shell: sh
Please permanently add '/home/user/.pixi/bin' to your $PATH to enable the 'pixi' command.
β¨ pixi 0.33.0 installed
Created /home/user/puppy/pixi.toml
Added python >=3.13.0,<4
Added uv>=0
π£ uv 0.4.22
Added click>=8
Python 3.13.0 | packaged by conda-forge | (main, Oct 8 2024, 20:04:32) [GCC 13.3.0]
[2024-10-17 14:34:20] πΆ has arrived to /home/user/puppy
[2024-10-17 14:34:20] πΆ = /home/user/puppy/.pixi/envs/default/bin/python /home/user/puppy/pup.py
[2024-10-17 14:34:20] π = /home/user/puppy
[2024-10-17 14:34:20] π = 3.13.0 | packaged by conda-forge | (main, Oct 8 2024, 20:04:32) [GCC 13.3.0]
[2024-10-17 14:34:20] πΆ heard: pup hi
[2024-10-17 14:34:20] πΆ said: woof! Nice to meet you. Check woof.log for pup command history
DONE 8.1s
--> RUN echo '#!/bin/bash\n/home/user/puppy/pup.py "$@"' > /home/user/.pixi/bin/pup && chmod +x /home/user/.pixi/bin/pup
DONE 0.1s
--> RUN pup
/home/user/puppy/pup.py: line 3: __doc__: command not found
/home/user/puppy/pup.py: line 7: __version__: command not found
/home/user/puppy/pup.py: line 9: import: command not found
/home/user/puppy/pup.py: line 10: import: command not found
/home/user/puppy/pup.py: line 11: import: command not found
/home/user/puppy/pup.py: line 12: import: command not found
/home/user/puppy/pup.py: line 13: import: command not found
/home/user/puppy/pup.py: line 14: import: command not found
/home/user/puppy/pup.py: line 15: from: command not found
/home/user/puppy/pup.py: line 16: from: command not found
/home/user/puppy/pup.py: line 17: from: command not found
/home/user/puppy/pup.py: line 19: import: command not found
/home/user/puppy/pup.py: line 22: syntax error near unexpected token `('
/home/user/puppy/pup.py: line 22: `class PupException(Exception):'
--> ERROR: process "/bin/sh -c pup" did not complete successfully: exit code: 2
- Dockerfile +22 -11
@@ -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"]
|