28 lines
610 B
Docker
28 lines
610 B
Docker
FROM python:3.11-slim
|
|
|
|
# Install system dependencies including TA-Lib C library
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
wget \
|
|
libta-lib-dev \
|
|
libpq-dev \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Copy dependency files
|
|
COPY pyproject.toml ./
|
|
|
|
# Install Python dependencies
|
|
RUN pip install --no-cache-dir --upgrade pip && \
|
|
pip install --no-cache-dir .
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Expose port for FastAPI
|
|
EXPOSE 8001
|
|
|
|
# Run the inference server by default
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8001"]
|