candle-annotator/services/ml/Dockerfile
Marko Djordjevic a6e0697ab5 fix: Change TA-Lib download URL to HTTPS in Dockerfile
Updated the wget command in services/ml/Dockerfile line 10 to use HTTPS instead of HTTP for downloading TA-Lib source. This improves security by ensuring encrypted transport.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-18 11:35:15 +01:00

43 lines
1 KiB
Docker

FROM python:3.11-slim
# Install system dependencies and build TA-Lib from source
RUN apt-get update && apt-get install -y \
build-essential \
wget \
curl \
libpq-dev \
&& rm -rf /var/lib/apt/lists/* \
&& wget https://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz \
&& tar -xzf ta-lib-0.4.0-src.tar.gz \
&& cd ta-lib/ \
&& ./configure --prefix=/usr \
&& make \
&& make install \
&& cd .. \
&& rm -rf ta-lib ta-lib-0.4.0-src.tar.gz
# 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
# Create non-root user and set ownership
RUN useradd -r -s /bin/false appuser
RUN chown -R appuser:appuser /app
# Switch to non-root user
USER appuser
# Run the inference server by default
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8001"]