Skip to content

Commit

Permalink
⭕ ml using requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
kamikazebr committed Oct 30, 2023
1 parent 2928a5a commit 3ed7f07
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions packages/ml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.10-slim-bullseye AS base
FROM python:3.10-slim-bullseye AS prod

ENV PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
Expand All @@ -9,16 +9,13 @@ RUN pip install -U pip setuptools wheel
RUN pip install pdm

# copy files
COPY pyproject.toml /project/
COPY . /project/

# install dependencies and project into the local packages directory
WORKDIR /project
RUN pdm install


FROM python:3.10-slim-bullseye as prod
RUN pdm lock
RUN pdm export --format requirements --without-hashes > requirements.txt

COPY . /project/
WORKDIR /project/
RUN pip install -r requirements.txt

CMD ["python","src/api.py"]

0 comments on commit 3ed7f07

Please sign in to comment.