-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from fortesenselabs/feature/environments
Reintegrate Nautilus Trader and Enhance TradeFlow Framework
- Loading branch information
Showing
1,522 changed files
with
761,867 additions
and
2,096 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[target.'cfg(all())'] | ||
rustflags = [ | ||
# https://rust-lang.github.io/rust-clippy/master/index.html#drop_non_drop | ||
# Disable this lint as we explicitly drop even when `Drop` is not implemented | ||
"-Aclippy::drop_non_drop", | ||
] | ||
|
||
[target.x86_64-pc-windows-msvc] | ||
rustflags = [ | ||
"-C", "target-feature=+crt-static", | ||
] | ||
|
||
[target.x86_64-apple-darwin] | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] | ||
|
||
[target.aarch64-apple-darwin] | ||
rustflags = [ | ||
"-C", "link-arg=-undefined", | ||
"-C", "link-arg=dynamic_lookup", | ||
] | ||
|
||
[target.x86_64-unknown-linux-musl] | ||
linker = "rust-lld" | ||
rustflags = [ | ||
"-C", "target-feature=-crt-static", | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
version: '3.5' | ||
|
||
services: | ||
postgres: | ||
container_name: nautilus-database | ||
image: postgres | ||
environment: | ||
POSTGRES_USER: ${POSTGRES_USER:-postgres} | ||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-pass} | ||
POSTGRES_DATABASE: nautilus | ||
PGDATA: /data/postgres | ||
volumes: | ||
- nautilus-database:/data/postgres | ||
ports: | ||
- "5432:5432" | ||
networks: | ||
- nautilus-network | ||
restart: unless-stopped | ||
|
||
pgadmin: | ||
container_name: nautilus-pgadmin | ||
image: dpage/pgadmin4 | ||
environment: | ||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:[email protected]} | ||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin} | ||
volumes: | ||
- pgadmin:/root/.pgadmin | ||
ports: | ||
- "${PGADMIN_PORT:-5051}:80" | ||
networks: | ||
- nautilus-network | ||
restart: unless-stopped | ||
|
||
redis: | ||
container_name: nautilus-redis | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
restart: unless-stopped | ||
networks: | ||
- nautilus-network | ||
|
||
networks: | ||
nautilus-network: | ||
|
||
volumes: | ||
nautilus-database: | ||
pgadmin: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ARG GIT_TAG | ||
FROM ghcr.io/nautechsystems/nautilus_trader:$GIT_TAG | ||
COPY --from=ghcr.io/nautechsystems/nautilus_data:main /opt/pysetup/catalog /catalog | ||
COPY docs/tutorials /opt/pysetup/tutorials | ||
RUN pip install jupyterlab datafusion | ||
ENV NAUTILUS_PATH="/" | ||
CMD ["python", "-m", "jupyterlab", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root", "-NotebookApp.token=''", "--NotebookApp.password=''", "tutorials"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM python:3.12-slim AS base | ||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
PYO3_PYTHON="/usr/local/bin/python3" \ | ||
POETRY_VERSION=1.8.3 \ | ||
POETRY_HOME="/opt/poetry" \ | ||
POETRY_VIRTUALENVS_CREATE=false \ | ||
POETRY_NO_INTERACTION=1 \ | ||
PYSETUP_PATH="/opt/pysetup" \ | ||
RUST_TOOLCHAIN="stable" \ | ||
BUILD_MODE="release" \ | ||
CC="clang" | ||
ENV PATH="/root/.cargo/bin:$POETRY_HOME/bin:$PATH" | ||
WORKDIR $PYSETUP_PATH | ||
|
||
FROM base AS builder | ||
|
||
# Install build deps | ||
RUN apt-get update && \ | ||
apt-get install -y curl clang git libssl-dev make pkg-config && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Rust | ||
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y | ||
|
||
# Install Poetry | ||
RUN curl -sSL https://install.python-poetry.org | python3 - | ||
|
||
# Install package requirements (split step and with --no-root to enable caching) | ||
COPY poetry.lock pyproject.toml build.py ./ | ||
RUN poetry install --no-root --only main | ||
|
||
# Build nautilus_trader | ||
COPY nautilus_core ./nautilus_core | ||
RUN (cd nautilus_core && cargo build --release --all-features) | ||
|
||
COPY nautilus_trader ./nautilus_trader | ||
COPY README.md ./ | ||
RUN poetry install --only main --all-extras | ||
RUN poetry build -f wheel | ||
RUN python -m pip install ./dist/*whl --force --no-deps | ||
RUN find /usr/local/lib/python3.12/site-packages -name "*.pyc" -exec rm -f {} \; | ||
|
||
# Final application image | ||
FROM base AS application | ||
|
||
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
*.tar.gz filter=lfs diff=lfs merge=lfs -text | ||
|
||
# Set standard UNIX/Linux/MacOSX line endings. | ||
* text=auto eol=lf | ||
|
||
# Denote all files that are truly binary and should not be modified. | ||
*.png binary | ||
*.ico binary | ||
*.jpg binary | ||
*.bz2 binary |
Oops, something went wrong.