-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 1022 Bytes
/
Copy pathDockerfile
File metadata and controls
37 lines (27 loc) · 1022 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
35
36
37
FROM python:3.12-slim-bookworm
# Install standard dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Install uv using the official binary image injection
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
# Set project working directory
WORKDIR /app
# Enable python bytecode compilation for performance
ENV UV_COMPILE_BYTECODE=1
# Copy project specifications for layer caching
COPY pyproject.toml uv.lock ./
# Sync dependencies (without installing the project itself yet)
RUN uv sync --frozen --no-install-project
# Copy application files
COPY src/ src/
COPY knowledge_base/ knowledge_base/
COPY README.md README.md
# Sync the whole project (installs the package itself)
RUN uv sync --frozen
# Expose Streamlit default port
EXPOSE 8501
# Command to boot Streamlit inside the container
CMD ["uv", "run", "streamlit", "run", "src/mit_bih/web/app.py", "--server.port=8501", "--server.address=0.0.0.0"]