Spaces:
Runtime error
Runtime error
Commit
·
34dfc46
1
Parent(s):
ee1fb7e
Changed versions
Browse files- Dockerfile +16 -26
- pyproject.toml +5 -2
- uv.lock +0 -0
Dockerfile
CHANGED
@@ -1,33 +1,23 @@
|
|
1 |
-
#
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
5 |
RUN useradd -m -u 1000 user
|
6 |
USER user
|
7 |
-
|
8 |
-
# Set environment variables
|
9 |
ENV HOME=/home/user \
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
# Set working directory
|
15 |
WORKDIR $HOME/app
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
# Install pip and dependencies
|
21 |
-
RUN pip install --no-cache-dir --upgrade pip && \
|
22 |
-
pip install --no-cache-dir -r requirements.txt
|
23 |
-
|
24 |
-
# Copy the rest of the application
|
25 |
-
COPY --chown=user . .
|
26 |
-
|
27 |
# Expose the port
|
28 |
EXPOSE 7860
|
29 |
-
|
30 |
# Run the app
|
31 |
-
CMD ["streamlit", "run", "
|
32 |
-
|
33 |
-
#ENTRYPOINT ["streamlit", "run", "Chatbot.py", "--server.port=8080", "--server.address=0.0.0.0", "--server.enableXsrfProtection=false"]
|
|
|
1 |
+
# MIKE DEAN ADAPTATION OF THE CHAINLIT DOCKERFILE USING UV
|
2 |
+
# December 31, 2024
|
3 |
+
# Get a distribution that has uv already installed
|
4 |
+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm-slim
|
5 |
+
# Add user - this is the user that will run the app
|
6 |
+
# If you do not set user, the app will run as root (undesirable)
|
7 |
RUN useradd -m -u 1000 user
|
8 |
USER user
|
9 |
+
# Set the home directory and path
|
|
|
10 |
ENV HOME=/home/user \
|
11 |
+
PATH=/home/user/.local/bin:$PATH
|
12 |
+
# NEW ENV STATEMENT
|
13 |
+
ENV UVICORN_WS_PROTOCOL=websockets
|
14 |
+
# Set the working directory
|
|
|
15 |
WORKDIR $HOME/app
|
16 |
+
# Copy the app to the container
|
17 |
+
COPY --chown=user . $HOME/app
|
18 |
+
# Install the dependencies
|
19 |
+
RUN uv sync --frozen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
# Expose the port
|
21 |
EXPOSE 7860
|
|
|
22 |
# Run the app
|
23 |
+
CMD ["uv", "run", "streamlit", "run", "Chatbot.py", "--host", "0.0.0.0", "--port", “7860"]
|
|
|
|
pyproject.toml
CHANGED
@@ -3,8 +3,9 @@ name = "midterm"
|
|
3 |
version = "0.1.0"
|
4 |
description = "intelligent customer support chat"
|
5 |
readme = "README.md"
|
6 |
-
requires-python = ">=3.
|
7 |
dependencies = [
|
|
|
8 |
"langchain-core==0.3.31",
|
9 |
"langchain==0.3.15",
|
10 |
"langchain-community==0.3.15",
|
@@ -15,7 +16,9 @@ dependencies = [
|
|
15 |
"pymupdf==1.25.2",
|
16 |
"langgraph>=0.2.67",
|
17 |
"langsmith>=0.3.1",
|
18 |
-
"openai>=1.
|
19 |
"cohere>=5.13.11",
|
20 |
"lxml>=5.3.0",
|
|
|
|
|
21 |
]
|
|
|
3 |
version = "0.1.0"
|
4 |
description = "intelligent customer support chat"
|
5 |
readme = "README.md"
|
6 |
+
requires-python = ">=3.12"
|
7 |
dependencies = [
|
8 |
+
"pydantic==2.10.1",
|
9 |
"langchain-core==0.3.31",
|
10 |
"langchain==0.3.15",
|
11 |
"langchain-community==0.3.15",
|
|
|
16 |
"pymupdf==1.25.2",
|
17 |
"langgraph>=0.2.67",
|
18 |
"langsmith>=0.3.1",
|
19 |
+
"openai>=1.58.1",
|
20 |
"cohere>=5.13.11",
|
21 |
"lxml>=5.3.0",
|
22 |
+
"streamlit>=1.29.0",
|
23 |
+
"websockets"
|
24 |
]
|
uv.lock
CHANGED
The diff for this file is too large to render.
See raw diff
|
|