-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 1.11 KB
/
Copy pathDockerfile
File metadata and controls
29 lines (22 loc) · 1.11 KB
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
# quantcortex application image (Python 3.11).
FROM python:3.11-slim-bookworm@sha256:721dc13fd1be0a771e54b72097634291d628d0007dee9da777e2ce676a9c998f
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONPATH=/app \
PIP_NO_CACHE_DIR=1 \
MPLCONFIGDIR=/tmp/matplotlib \
XDG_CACHE_HOME=/tmp/cache \
XDG_STATE_HOME=/tmp/state
WORKDIR /app
# Runtime library needed by LightGBM/XGBoost when optional models are mounted.
RUN apt-get update && apt-get install -y --no-install-recommends \
libgomp1 \
&& rm -rf /var/lib/apt/lists/*
# Install the locked operational stack first for deterministic layer caching.
COPY requirements/runtime.lock requirements/runtime.lock
RUN python -m pip install --no-cache-dir -r requirements/runtime.lock
RUN groupadd --gid 10001 quantcortex \
&& useradd --uid 10001 --gid quantcortex --create-home quantcortex
COPY --chown=quantcortex:quantcortex . .
USER quantcortex
CMD ["python", "-c", "import quantcortex.alpha, quantcortex.backtest, quantcortex.data, quantcortex.execution, quantcortex.portfolio, quantcortex.strategies; print('quantcortex container ready')"]