Spaces:
Sleeping
Sleeping
change to uv
Browse files
.chainlit/config.toml:Zone.Identifier:Zone.Identifier
DELETED
File without changes
|
.chainlit/config.yaml
DELETED
@@ -1,9 +0,0 @@
|
|
1 |
-
chainlit_server:
|
2 |
-
host: 0.0.0.0
|
3 |
-
port: 7860
|
4 |
-
headless: true
|
5 |
-
|
6 |
-
# Project settings
|
7 |
-
project:
|
8 |
-
# Force HTTP mode
|
9 |
-
enable_websocket: false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.venv/bin/python3
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
python
|
.venv/bin/python3.13
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
python
|
Dockerfile
CHANGED
@@ -31,50 +31,66 @@
|
|
31 |
# # CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
32 |
|
33 |
|
34 |
-
FROM python:3.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
-
# Create user with specific UID
|
37 |
-
RUN useradd -m -u 1000 user
|
38 |
|
39 |
-
#
|
40 |
-
ENV HOME=/home/user \
|
41 |
-
PATH=/home/user/.local/bin:$PATH
|
42 |
-
|
43 |
-
# Set working directory
|
44 |
-
WORKDIR $HOME/app
|
45 |
|
46 |
-
|
47 |
-
COPY requirements.txt .
|
48 |
-
RUN pip install --upgrade pip && \
|
49 |
-
pip install --no-cache-dir -r requirements.txt
|
50 |
|
51 |
-
#
|
52 |
-
|
|
|
|
|
53 |
|
54 |
-
#
|
55 |
-
|
56 |
-
|
57 |
-
chown -R user:user /home/user
|
58 |
|
59 |
-
|
60 |
-
chmod -R 755 /home/user/app
|
61 |
|
62 |
-
# RUN pip install pydantic==2.10.1 chainlit
|
63 |
|
64 |
-
|
65 |
-
|
66 |
|
|
|
|
|
67 |
|
|
|
|
|
|
|
68 |
|
69 |
-
# Expose port
|
70 |
EXPOSE 7860
|
71 |
|
72 |
-
#
|
73 |
-
|
74 |
-
|
75 |
-
# Run the application
|
76 |
-
# CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860", "--no-cache"]
|
77 |
-
CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860", "--headless"]
|
78 |
-
|
79 |
-
|
80 |
-
# CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
31 |
# # CMD ["chainlit", "run", "app.py", "--port", "7860"]
|
32 |
|
33 |
|
34 |
+
# FROM python:3.10
|
35 |
+
# # Create user with specific UID
|
36 |
+
# RUN useradd -m -u 1000 user
|
37 |
+
# # Set environment variables
|
38 |
+
# ENV HOME=/home/user \
|
39 |
+
# PATH=/home/user/.local/bin:$PATH
|
40 |
+
# # Set working directory
|
41 |
+
# WORKDIR $HOME/app
|
42 |
+
# # Copy requirements and install dependencies as root
|
43 |
+
# COPY requirements.txt .
|
44 |
+
# RUN pip install --upgrade pip && \
|
45 |
+
# pip install --no-cache-dir -r requirements.txt
|
46 |
+
# # Copy application files
|
47 |
+
# COPY . .
|
48 |
+
# # Create necessary directories and set permissions
|
49 |
+
# RUN mkdir -p /home/user/app/.files && \
|
50 |
+
# mkdir -p /home/user/.local && \
|
51 |
+
# chown -R user:user /home/user
|
52 |
+
# RUN chown -R user:user /home/user && \
|
53 |
+
# chmod -R 755 /home/user/app
|
54 |
+
# # RUN pip install pydantic==2.10.1 chainlit
|
55 |
+
# COPY chainlit.md .
|
56 |
+
# COPY .chainlit/config.yaml /home/user/app/.chainlit/config.yaml
|
57 |
+
# # Expose port
|
58 |
+
# EXPOSE 7860
|
59 |
+
# # Switch to non-root user
|
60 |
+
# USER user
|
61 |
+
# # Run the application
|
62 |
+
# # CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860", "--no-cache"]
|
63 |
+
# CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860", "--headless"]
|
64 |
|
|
|
|
|
65 |
|
66 |
+
# CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
67 |
|
68 |
+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
|
|
|
|
|
|
|
69 |
|
70 |
+
# Add user - this is the user that will run the app
|
71 |
+
# If you do not set user, the app will run as root (undesirable)
|
72 |
+
RUN useradd -m -u 1000 user
|
73 |
+
USER user
|
74 |
|
75 |
+
# Set the home directory and path
|
76 |
+
ENV HOME=/home/user \
|
77 |
+
PATH=/home/user/.local/bin:$PATH
|
|
|
78 |
|
79 |
+
ENV UVICORN_WS_PROTOCOL=websockets
|
|
|
80 |
|
|
|
81 |
|
82 |
+
# Set the working directory
|
83 |
+
WORKDIR $HOME/app
|
84 |
|
85 |
+
# Copy the app to the container
|
86 |
+
COPY --chown=user . $HOME/app
|
87 |
|
88 |
+
# Install the dependencies
|
89 |
+
# RUN uv sync --frozen
|
90 |
+
RUN uv sync
|
91 |
|
92 |
+
# Expose the port
|
93 |
EXPOSE 7860
|
94 |
|
95 |
+
# Run the app
|
96 |
+
CMD ["uv", "run", "chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.chainlit/config.toml:Zone.Identifier → pyproject.toml
RENAMED
File without changes
|