-
-
Notifications
You must be signed in to change notification settings - Fork 420
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 706 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
FROM python:3.12-slim
RUN apt-get update && apt-get install -y \
libportaudio2 \
portaudio19-dev \
libgl1 \
libglib2.0-0 \
git \
&& rm -rf /var/lib/apt/lists/*
RUN pip install uv
# Create a non-root user for security
RUN useradd -m -u 1000 glados
WORKDIR /app
# Set ownership of /app so glados can create .venv
RUN chown glados:glados /app
COPY --chown=glados:glados pyproject.toml README.md ./
COPY --chown=glados:glados models/ ./models/
COPY --chown=glados:glados src/ ./src/
USER glados
RUN uv sync --extra api --extra cpu --no-dev \
&& uv run glados download
EXPOSE 5050
CMD ["uv", "run", "litestar", "--app", "glados.api.app:app", "run", "--host", "0.0.0.0", "--port", "5050"]