Repository navigation
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (38 loc) · 1.66 KB
/
Copy pathDockerfile
File metadata and controls
53 lines (38 loc) · 1.66 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
53
# KJScreener local Docker build (based on Screeni-py style)
FROM python:3.13-slim-bookworm
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential wget curl git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV LANG=C.UTF-8 \
PYTHONUNBUFFERED=TRUE \
PYTHONDONTWRITEBYTECODE=TRUE \
KJScreener_GUI=TRUE \
KJScreener_DOCKER=TRUE \
TZ=Asia/Kolkata \
PATH=/opt/program:$PATH
WORKDIR /opt/program
# Install uv for fast deps
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
COPY requirements.txt pyproject.toml ./
RUN uv venv /venv
ENV PATH=/venv/bin:$PATH
ENV UV_PROJECT_ENVIRONMENT=/venv
# Core deps from requirements (ta-lib 0.6.5+ has manylinux wheels — no system lib needed)
RUN uv pip install --python /venv/bin/python -r requirements.txt || \
uv pip install --python /venv/bin/python \
numpy==2.1.0 pandas==2.2.3 scipy yfinance tabulate alive-progress \
openpyxl requests streamlit streamlit-local-storage Pillow joblib \
pyyaml plotly httpx apscheduler openai-agents openai anthropic litellm \
mplfinance num2words ta chromadb nsetools progress retrying appdirs \
cachecontrol contextlib2
# Optional TA packages (no-deps to avoid numpy conflicts)
RUN uv pip install --python /venv/bin/python --no-deps advanced-ta pandas-ta-remake 2>/dev/null || true
COPY . .
RUN chmod +x ./* 2>/dev/null || true
EXPOSE 8501
EXPOSE 8000
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
WORKDIR /opt/program/src
ENTRYPOINT ["streamlit", "run", "streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]