-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (25 loc) · 894 Bytes
/
Dockerfile
File metadata and controls
34 lines (25 loc) · 894 Bytes
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
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create a virtual environment
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Install uv using pip
RUN pip install uv
# Copy the current directory contents into the container at /app
COPY . /app
# Install any needed packages specified in requirements.txt
RUN uv pip install -r requirements.txt
# Expose the port that the app runs on
EXPOSE 8501
# Health check to verify the application is running
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
# Run the application
ENTRYPOINT ["streamlit", "run", "chat_app.py", "--server.port=8501"]