stock-flow/.agent/skills/sakata/Dockerfile

38 lines
867 B
Docker
Raw Normal View History

2026-01-30 09:02:35 +00:00
FROM python:3.11-slim
# 安裝系統依賴 (TA-Lib 與中文字體)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
wget \
fonts-noto-cjk \
&& rm -rf /var/lib/apt/lists/*
# 安裝 TA-Lib C library
RUN wget http://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
# 設置工作目錄
WORKDIR /app
# 複製依賴文件
COPY requirements.txt .
# 安裝 Python 依賴
RUN pip install --no-cache-dir -r requirements.txt
# 複製腳本
COPY scripts/ ./scripts/
# 設置環境變數
ENV PYTHONUNBUFFERED=1
ENV MPLCONFIGDIR=/tmp/matplotlib
# 預設入口點
ENTRYPOINT ["python", "scripts/sakata_analyzer.py"]