-
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.
- Loading branch information
1 parent
b786b00
commit 0e49ea2
Showing
2 changed files
with
71 additions
and
20 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 |
---|---|---|
@@ -1,38 +1,90 @@ | ||
# Use a lightweight Python base image | ||
FROM python:3.11-slim-buster | ||
FROM rust:slim-buster | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
ENV USER=root | ||
ENV PYTHON_VERSION=3.11.3 | ||
|
||
# Install system dependencies including wget | ||
# Install system dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
sudo \ | ||
wget \ | ||
curl \ | ||
build-essential \ | ||
clang \ | ||
build-essential \ | ||
zlib1g-dev \ | ||
libncurses5-dev \ | ||
libgdbm-dev \ | ||
libnss3-dev \ | ||
libssl-dev \ | ||
libreadline-dev \ | ||
libffi-dev \ | ||
python3-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
curl \ | ||
libbz2-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Rust compiler (required for nautilus-trader) | ||
RUN curl -sSL https://sh.rustup.rs | sh -s -- -y | ||
WORKDIR /tmp | ||
RUN wget https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz \ | ||
&& tar -xzf Python-$PYTHON_VERSION.tgz \ | ||
&& cd Python-$PYTHON_VERSION \ | ||
&& ./configure --enable-optimizations \ | ||
&& make -j $(nproc) \ | ||
&& make altinstall | ||
|
||
# RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo | ||
# ENV PATH="/usr/local/bin:$PATH" | ||
RUN ln -s /usr/local/bin/python3.11 /usr/local/bin/python | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# RUN apt-get update && \ | ||
# apt-get install -y \ | ||
# sudo \ | ||
# wget \ | ||
# curl \ | ||
# build-essential \ | ||
# clang \ | ||
# libssl-dev \ | ||
# libffi-dev \ | ||
# python3-dev \ | ||
# && rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Rust compiler (required for nautilus-trader) | ||
# RUN curl -sSL https://sh.rustup.rs | sh -s -- -y && \ | ||
# . $HOME/.cargo/env | ||
|
||
# USER docker | ||
# RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo | ||
|
||
# Copy the application code | ||
# # Copy the application code | ||
COPY . . | ||
|
||
# Install application system dependencies (e.g., TA-Lib) | ||
RUN bash scripts/install-talib.sh | ||
# RUN bash scripts/install-pygame.sh | ||
# # Install application system dependencies (e.g., TA-Lib) | ||
# RUN bash scripts/install-talib.sh | ||
# # RUN bash scripts/install-pygame.sh | ||
|
||
# Install package | ||
RUN pip install -e . | ||
# # Install package | ||
# RUN python -m pip install -e . | ||
|
||
# Set the command to run when the container starts | ||
ENTRYPOINT ["sh"] | ||
|
||
|
||
# RUN adduser --disabled-password --gecos '' $USER | ||
# RUN adduser $USER sudo | ||
# RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
# RUN chown -R $USER /home/$USER | ||
|
||
# USER root | ||
|
||
# RUN sudo apt-get install -y python3 make build-essential libssl-dev zlib1g-dev libbz2-dev \ | ||
# libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ | ||
# xz-utils tk-dev libffi-dev liblzma-dev python-openssl git && \ | ||
# curl https://pyenv.run | bash && \ | ||
# curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 | ||
|
||
# ENV HOME /home/$USER | ||
# ENV PYENV_ROOT $HOME/.pyenv | ||
# ENV POETRY_ROOT $HOME/.poetry | ||
# ENV CARGO_ROOT /usr/local/cargo | ||
# ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH | ||
# ENV PATH $POETRY_ROOT/bin:$PATH | ||
# ENV PATH $CARGO_ROOT/bin:$PATH |
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 |
---|---|---|
|
@@ -8,5 +8,4 @@ run: | |
|
||
shell: | ||
docker exec -it trade_flow sh | ||
|
||
|