-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (24 loc) · 1.09 KB
/
Copy pathDockerfile
File metadata and controls
33 lines (24 loc) · 1.09 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
FROM python:3.11-slim
LABEL org.opencontainers.image.title="Multivariate Time Series Forecasting"
LABEL org.opencontainers.image.description="LSTM + Transformer + XGBoost pipeline for Store Sales forecasting"
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Pinned CPU lock (compiled for Python 3.11); the torch==2.5.1+cpu wheel only
# exists on the PyTorch index.
COPY requirements-cpu.lock .
RUN pip install --no-cache-dir \
--extra-index-url https://download.pytorch.org/whl/cpu \
-r requirements-cpu.lock
# Install the foresight package itself. The project uses a src layout, so the
# repo checkout alone is NOT importable — without this, `streamlit run
# dashboard/app.py` fails with ModuleNotFoundError: foresight.
COPY pyproject.toml .
COPY src/ src/
RUN pip install --no-cache-dir .
RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
USER appuser
COPY --chown=appuser:appuser . .
EXPOSE 8501
CMD ["streamlit", "run", "dashboard/app.py", "--server.port=8501", "--server.address=0.0.0.0"]