Spaces:
Sleeping
Sleeping
CMD and cleanup
Browse files- Dockerfile +8 -8
- pup +1 -2
Dockerfile
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
FROM debian:latest AS base
|
2 |
|
3 |
RUN apt-get update \
|
@@ -6,11 +8,6 @@ RUN apt-get update \
|
|
6 |
|
7 |
# Create user
|
8 |
RUN useradd -m -u 1000 user
|
9 |
-
# RUN mkdir -p /home/user && \
|
10 |
-
# mkdir -p /etc/skel
|
11 |
-
# RUN echo "user:x:1000:1000::/home/user:/bin/bash" >> /etc/passwd && \
|
12 |
-
# echo "user:x:1000:" >> /etc/group
|
13 |
-
# RUN chown -R user:user /home/user
|
14 |
|
15 |
USER user
|
16 |
|
@@ -25,12 +22,15 @@ COPY --chown=user pup .
|
|
25 |
CMD ["bash"]
|
26 |
|
27 |
|
|
|
|
|
28 |
FROM base
|
|
|
29 |
RUN $PUP
|
30 |
-
|
31 |
RUN pup py3.11
|
32 |
|
33 |
EXPOSE 7860
|
34 |
-
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
35 |
|
36 |
-
|
|
|
|
1 |
+
#### Base OS ####
|
2 |
+
|
3 |
FROM debian:latest AS base
|
4 |
|
5 |
RUN apt-get update \
|
|
|
8 |
|
9 |
# Create user
|
10 |
RUN useradd -m -u 1000 user
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
USER user
|
13 |
|
|
|
22 |
CMD ["bash"]
|
23 |
|
24 |
|
25 |
+
#### pixi, uv, python ####
|
26 |
+
|
27 |
FROM base
|
28 |
+
|
29 |
RUN $PUP
|
30 |
+
|
31 |
RUN pup py3.11
|
32 |
|
33 |
EXPOSE 7860
|
|
|
34 |
|
35 |
+
CMD ["pixi", "run", "python", "-m", "http.server", "7860", "--directory", "."]
|
36 |
+
# CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
pup
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
#!/usr/bin/bash
|
2 |
-
VERSION="pup v0 @ Apr
|
3 |
|
4 |
|
5 |
####################
|
@@ -73,7 +73,6 @@ if [ -z "$1" ]; then
|
|
73 |
if [ "$SYMLINK_CURRENT" != "$(pwd)/pup" ] && [ -f "./pup" ]; then
|
74 |
SYMLINK_PATH_FOLDER=${SYMLINK_ON_PATH%/*}
|
75 |
mkdir -p "$SYMLINK_PATH_FOLDER"
|
76 |
-
# echo $SYMLINK_PATH_FOLDER
|
77 |
ln -s -f "$(pwd)"/pup $SYMLINK_ON_PATH
|
78 |
fi
|
79 |
log_command "$0 $*"
|
|
|
1 |
#!/usr/bin/bash
|
2 |
+
VERSION="pup v0 @ Apr 2 2024" # for Debian
|
3 |
|
4 |
|
5 |
####################
|
|
|
73 |
if [ "$SYMLINK_CURRENT" != "$(pwd)/pup" ] && [ -f "./pup" ]; then
|
74 |
SYMLINK_PATH_FOLDER=${SYMLINK_ON_PATH%/*}
|
75 |
mkdir -p "$SYMLINK_PATH_FOLDER"
|
|
|
76 |
ln -s -f "$(pwd)"/pup $SYMLINK_ON_PATH
|
77 |
fi
|
78 |
log_command "$0 $*"
|