deepali1021 commited on
Commit
34dfc46
·
1 Parent(s): ee1fb7e

Changed versions

Browse files
Files changed (3) hide show
  1. Dockerfile +16 -26
  2. pyproject.toml +5 -2
  3. uv.lock +0 -0
Dockerfile CHANGED
@@ -1,33 +1,23 @@
1
- # Use Python 3.11 which has better compatibility with most packages
2
- FROM python:3.12.4
3
-
4
- # Add user
 
 
5
  RUN useradd -m -u 1000 user
6
  USER user
7
-
8
- # Set environment variables
9
  ENV HOME=/home/user \
10
- PATH=/home/user/.local/bin:$PATH \
11
- PYTHONUNBUFFERED=1 \
12
- PYTHONDONTWRITEBYTECODE=1
13
-
14
- # Set working directory
15
  WORKDIR $HOME/app
16
-
17
- # Copy requirements first to leverage Docker cache
18
- COPY --chown=user requirements.txt .
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", "--server.address", "0.0.0.0", "--server.port", "7860", "Chatbot.py", "--server.enableXsrfProtection=false"]
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.13"
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.60.0",
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