Skip to content

Commit a38e1db

Browse files
committed
Generate model artifact during Docker build
1 parent 0cf74d2 commit a38e1db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ FROM python:3.11-slim
22

33
WORKDIR /app
44

5-
ENV PYTHONDONTWRITEBYTECODE=1
6-
ENV PYTHONUNBUFFERED=1
7-
85
RUN useradd -m appuser
96

107
COPY requirements.txt .
11-
128
RUN pip install --no-cache-dir --upgrade pip && \
139
pip install --no-cache-dir -r requirements.txt
1410

1511
COPY app ./app
1612
COPY model ./model
1713

14+
RUN python model/train.py
15+
16+
RUN chown -R appuser:appuser /app
17+
1818
USER appuser
1919

2020
EXPOSE 8000

0 commit comments

Comments
 (0)