| |
| |
|
|
| FROM python:3.11-slim |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV PYTHONUNBUFFERED=1 |
| |
| ENV KAFKA_HEAP_OPTS="-Xmx400m -Xms256m" |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| default-jre-headless \ |
| wget \ |
| nginx \ |
| build-essential \ |
| libssl-dev \ |
| zlib1g-dev \ |
| libbz2-dev \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| ARG KAFKA_VERSION=3.7.0 |
| RUN wget -q \ |
| "https://archive.apache.org/dist/kafka/${KAFKA_VERSION}/kafka_2.13-${KAFKA_VERSION}.tgz" \ |
| -O /tmp/kafka.tgz \ |
| && tar -xzf /tmp/kafka.tgz -C /opt \ |
| && mv /opt/kafka_2.13-${KAFKA_VERSION} /opt/kafka \ |
| && rm /tmp/kafka.tgz |
|
|
| |
| |
| RUN pip install --no-cache-dir \ |
| kafka-python==2.0.2 \ |
| Flask==2.2.5 \ |
| requests==2.31.0 \ |
| quickfix \ |
| "numpy<2.0" \ |
| pandas==2.2.3 \ |
| scikit-learn==1.6.1 \ |
| stable-baselines3==2.4.1 \ |
| huggingface_hub==0.28.1 \ |
| && echo "pip-v2.0.3" |
|
|
| |
| WORKDIR /app |
|
|
| COPY shared/ /app/shared/ |
| RUN mkdir -p /app/data |
| |
| ENV SCHEDULE_FILE=/app/shared/data/market_schedule.txt |
|
|
| |
| COPY matcher/matcher.py /app/matcher.py |
| COPY matcher/database.py /app/database.py |
|
|
| |
| COPY md_feeder/mdf_simulator.py /app/mdf_simulator.py |
|
|
| |
| COPY dashboard/dashboard.py /app/dashboard.py |
| COPY dashboard/templates/ /app/templates/ |
|
|
| |
| COPY frontend/frontend.py /app/frontend.py |
| COPY frontend/templates/ /app/frontend_templates/ |
|
|
| |
| COPY fix_oeg/fix_oeg_server.py /app/fix_oeg/fix_oeg_server.py |
| COPY fix_oeg/FIX44.xml /app/fix_oeg/FIX44.xml |
| |
| COPY fix_server_hf.cfg /app/fix_oeg/fix_server.cfg |
|
|
| |
| COPY fix-ui-client/fix-ui-client.py /app/fix_ui/fix_ui_client.py |
| COPY fix-ui-client/templates/ /app/fix_ui/templates/ |
| COPY client_hf.cfg /app/fix_ui/client_hf.cfg |
|
|
| |
| COPY ai_analyst/ai_analyst.py /app/ai_analyst.py |
|
|
| |
| COPY clearing_house/ /app/clearing_house/ |
|
|
| |
| COPY kafka-kraft.properties /opt/kafka/config/kraft/server.properties |
|
|
| |
| COPY nginx.conf /etc/nginx/nginx.conf |
|
|
| |
| COPY entrypoint.sh /entrypoint.sh |
| RUN chmod +x /entrypoint.sh |
|
|
| EXPOSE 7860 |
|
|
| CMD ["/entrypoint.sh"] |
|
|