Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# ==================================================
# Global build arguments
# ==================================================
ARG TRADING_RUNTIME_COMMIT


# ==================================================
# Dependency + test stage
# ==================================================
Expand All @@ -26,12 +20,11 @@ RUN apt-get update && \
rm -rf /var/lib/apt/lists/*

# Install Python dependencies first (maximizes Docker cache)
COPY requirements.txt .
COPY requirements-dev.txt .
COPY requirements.txt requirements-dev.txt .

RUN pip install --upgrade pip && \
pip install --prefix=/install -r requirements.txt && \
pip install --prefix=/install -r requirements-dev.txt
RUN pip install --upgrade pip \
&& pip install --prefix=/install -r requirements.txt \
&& pip install --prefix=/install-dev -r requirements-dev.txt

# Copy project files
COPY pyproject.toml .
Expand All @@ -43,6 +36,7 @@ COPY tests/ tests/
RUN pip install --prefix=/install .

# Run test & quality checks
ENV PYTHONPATH="/install/lib/python3.11/site-packages:/install-dev/lib/python3.11/site-packages"
RUN chmod +x check.sh && ./check.sh


Expand Down Expand Up @@ -72,8 +66,5 @@ RUN adduser --disabled-password --gecos '' appuser
# Copy only installed Python artifacts from build stage
COPY --from=build /install /usr/local

# Application directory (mostly symbolic now — no source code needed)
WORKDIR /app

# Drop privileges
USER appuser
2 changes: 1 addition & 1 deletion argo/workflowtemplate-backtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:

- name: experiment-config
description: "Path to experiment JSON inside the container"
value: /workspaces/trading-runtime/strategies/
value: /usr/local/lib/python3.11/site-packages/trading_runtime/argo/argo.json

- name: scratch-root
description: "Scratch root inside the container"
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ dev = [
[tool.setuptools.packages.find]
include = ["trading_runtime*"]

# --------------------------------------------------
# Include runtime assets
# --------------------------------------------------
[tool.setuptools.package-data]
trading_runtime = ["**/*"]

[tool.setuptools]
include-package-data = true

# --------------------------------------------------
# Pytest
# --------------------------------------------------
Expand Down