Add remote TimesFM service integration

This commit is contained in:
2569718930@qq.com
2026-03-29 22:13:10 +08:00
parent 5b0506a663
commit cdfc785402
12 changed files with 648 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
FROM python:3.11-slim
WORKDIR /srv/timesfm_service
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
TIMESFM_HOST=0.0.0.0 \
TIMESFM_PORT=8011
RUN apt-get update \
&& apt-get install -y --no-install-recommends git \
&& rm -rf /var/lib/apt/lists/*
COPY timesfm_service/requirements.txt /tmp/requirements.txt
RUN pip install --upgrade pip \
&& pip install -r /tmp/requirements.txt
# Official upstream install path from google-research/timesfm README.
RUN git clone --depth 1 https://github.com/google-research/timesfm.git /tmp/timesfm \
&& pip install /tmp/timesfm
COPY timesfm_service /srv/timesfm_service
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port ${TIMESFM_PORT:-8011}"]