-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (41 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
52 lines (41 loc) · 1.27 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Dockerfile for Polymarket Trading System
# Runs all 3 models + dashboard
FROM python:3.11-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
sqlite3 \
curl \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /app
# Copy project files
COPY . /app/
# Install Python dependencies
RUN pip install --no-cache-dir \
fastapi \
uvicorn \
httpx \
pydantic \
python-dotenv \
pyyaml \
openai \
py-clob-client \
web3
# Install local packages
RUN cd /app/toolkit/execution-engine && pip install -e . || true
RUN cd /app/toolkit/mean-reversion && pip install -e . || true
RUN cd /app/toolkit/polymarket-data && pip install -e . || true
RUN cd /app/toolkit/volatility-alerts && pip install -e . || true
# Create necessary directories
RUN mkdir -p /app/data /app/logs /app/data/recordings_conservative \
/app/data/recordings_moderate /app/data/recordings_aggressive
# Initialize databases
RUN python3 /app/scripts/init_databases.py || true
# Expose dashboard port
EXPOSE 8000
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
CMD curl -f http://localhost:8000/api/health || exit 1
# Default command (can be overridden)
CMD ["python3", "api/dashboard_api.py"]