File size: 958 Bytes
35bda59
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d01485
 
35bda59
6d01485
35bda59
 
0605eb7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Use an official Python runtime as a parent image
FROM python:3.11-slim-buster

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app/
COPY app.py /app
COPY vector_DB.py /app
COPY llm_interaction.py /app
COPY doc_preprocessing.py /app
COPY pyproject.toml /app
COPY uv.lock /app

# Install uv
RUN pip install uv

# Create a virtual environment with uv
RUN uv venv .venv

# Activate the virtual environment. This is important for subsequent commands.
ENV PATH="/app/.venv/bin:$PATH"

# Install project dependencies from pyproject.toml and uv.lock
#RUN uv pip install --no-cache-dir -r /app/uv.lock
RUN uv sync --locked
# Make port 7860 available to the world outside this container
EXPOSE 7860

HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health

# Run app.py when the container launches
CMD ["streamlit", "run", "app.py","--server.port=7860", "--server.address=0.0.0.0"]