-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.api
More file actions
32 lines (24 loc) · 847 Bytes
/
Dockerfile.api
File metadata and controls
32 lines (24 loc) · 847 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
FROM python:3.11-slim
WORKDIR /app
# Minimal OS deps: curl for healthcheck
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl \
&& rm -rf /var/lib/apt/lists/*
# Copy source code and install dependencies
COPY pyproject.toml README.md ./
COPY src/ ./src/
COPY nedc_eeg_eval/ ./nedc_eeg_eval/
RUN pip install --no-cache-dir uv \
&& uv pip install --system --no-cache -e ".[api]"
# Entrypoint for runtime configurability
COPY docker-entrypoint.sh ./docker-entrypoint.sh
RUN chmod +x ./docker-entrypoint.sh
# Non-root user
RUN useradd -u 10001 -m appuser \
&& chown -R appuser:appuser /app
USER appuser
ENV NEDC_NFC=/app/nedc_eeg_eval/v6.0.0
ENV PYTHONPATH=/app/nedc_eeg_eval/v6.0.0/lib:${PYTHONPATH}
EXPOSE 8000
# Default entrypoint reads LOG_LEVEL and MAX_WORKERS
ENTRYPOINT ["/app/docker-entrypoint.sh"]