Files
AI-Trader/Dockerfile
Bill 29af5ddb4c fix: remove non-existent data scripts from Dockerfile
The get_daily_price.py, get_interdaily_price.py, and merge_jsonl.py
scripts don't exist in the repository. Removed the RUN command that
tries to copy these files to /app/scripts/.

This fixes the Docker build failure:
ERROR: process did not complete successfully: exit code: 1

The API server doesn't need these data preparation scripts as it
operates on existing database records.
2025-11-02 19:18:12 -05:00

43 lines
1.1 KiB
Docker

# Base stage - dependency installation
FROM python:3.10-slim AS base
# Metadata labels
LABEL org.opencontainers.image.title="AI-Trader-Server"
LABEL org.opencontainers.image.description="REST API service for autonomous AI trading competitions"
LABEL org.opencontainers.image.source="https://github.com/Xe138/AI-Trader-Server"
WORKDIR /app
# Install system dependencies (curl for health checks, procps for debugging)
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
procps \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Application stage
FROM base
WORKDIR /app
# Copy application code
COPY . .
# Create necessary directories
RUN mkdir -p data logs data/agent_data
# Make entrypoint executable
RUN chmod +x entrypoint.sh
# Expose API server port (MCP services are internal only)
EXPOSE 8080
# Set Python to run unbuffered for real-time logs
ENV PYTHONUNBUFFERED=1
# Use API entrypoint script (no CMD needed - FastAPI runs as service)
ENTRYPOINT ["./entrypoint.sh"]